| @@ -11,12 +11,15 @@ | |||
| #include "AudioSampleCashregister.h" // http://www.freesound.org/people/kiddpark/sounds/201159/ | |||
| #include <Bounce.h> | |||
| /////////////////////////////////// | |||
| // copy the Design Tool code here | |||
| /////////////////////////////////// | |||
| // Bounce objects to read pushbuttons | |||
| Bounce button0 = Bounce(0, 15); | |||
| Bounce button1 = Bounce(1, 15); // 15 ms debounce time | |||
| @@ -2,6 +2,7 @@ | |||
| // | |||
| // Part 2-1: Using the Microphone | |||
| /////////////////////////////////// | |||
| // copy the Design Tool code here | |||
| /////////////////////////////////// | |||
| @@ -15,7 +16,7 @@ void setup() { | |||
| sgtl5000_1.enable(); | |||
| sgtl5000_1.volume(0.5); | |||
| sgtl5000_1.inputSelect(AUDIO_INPUT_MIC); | |||
| sgtl5000_1.micGain(40); | |||
| sgtl5000_1.micGain(32); | |||
| delay(1000); | |||
| } | |||
| @@ -2,6 +2,8 @@ | |||
| // | |||
| // Part 2-6: Feedback (Echo) Delay | |||
| /////////////////////////////////// | |||
| // copy the Design Tool code here | |||
| /////////////////////////////////// | |||
| @@ -7,23 +7,7 @@ | |||
| // copy the Design Tool code here | |||
| /////////////////////////////////// | |||
| #include <Audio.h> | |||
| #include <Wire.h> | |||
| #include <SPI.h> | |||
| #include <SD.h> | |||
| #include <SerialFlash.h> | |||
| // GUItool: begin automatically generated code | |||
| AudioPlaySdWav playSdWav1; //xy=382,95 | |||
| AudioAnalyzePeak peak2; //xy=571,221 | |||
| AudioAnalyzePeak peak1; //xy=587,174 | |||
| AudioOutputI2S i2s1; //xy=648,111 | |||
| AudioConnection patchCord1(playSdWav1, 0, i2s1, 0); | |||
| AudioConnection patchCord2(playSdWav1, 0, peak1, 0); | |||
| AudioConnection patchCord3(playSdWav1, 1, i2s1, 1); | |||
| AudioConnection patchCord4(playSdWav1, 1, peak2, 0); | |||
| AudioControlSGTL5000 sgtl5000_1; //xy=399,187 | |||
| // GUItool: end automatically generated code | |||
| void setup() { | |||
| @@ -9,6 +9,7 @@ Bounce button1 = Bounce(1, 15); // 15 = 15 ms debounce time | |||
| Bounce button2 = Bounce(2, 15); | |||
| /////////////////////////////////// | |||
| // copy the Design Tool code here | |||
| /////////////////////////////////// | |||