#include "AudioSampleCashregister.h" // http://www.freesound.org/people/kiddpark/sounds/201159/ | #include "AudioSampleCashregister.h" // http://www.freesound.org/people/kiddpark/sounds/201159/ | ||||
#include <Bounce.h> | #include <Bounce.h> | ||||
/////////////////////////////////// | /////////////////////////////////// | ||||
// copy the Design Tool code here | // copy the Design Tool code here | ||||
/////////////////////////////////// | /////////////////////////////////// | ||||
// Bounce objects to read pushbuttons | // Bounce objects to read pushbuttons | ||||
Bounce button0 = Bounce(0, 15); | Bounce button0 = Bounce(0, 15); | ||||
Bounce button1 = Bounce(1, 15); // 15 ms debounce time | Bounce button1 = Bounce(1, 15); // 15 ms debounce time |
// | // | ||||
// Part 2-1: Using the Microphone | // Part 2-1: Using the Microphone | ||||
/////////////////////////////////// | /////////////////////////////////// | ||||
// copy the Design Tool code here | // copy the Design Tool code here | ||||
/////////////////////////////////// | /////////////////////////////////// | ||||
sgtl5000_1.enable(); | sgtl5000_1.enable(); | ||||
sgtl5000_1.volume(0.5); | sgtl5000_1.volume(0.5); | ||||
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC); | sgtl5000_1.inputSelect(AUDIO_INPUT_MIC); | ||||
sgtl5000_1.micGain(40); | |||||
sgtl5000_1.micGain(32); | |||||
delay(1000); | delay(1000); | ||||
} | } | ||||
// | // | ||||
// Part 2-6: Feedback (Echo) Delay | // Part 2-6: Feedback (Echo) Delay | ||||
/////////////////////////////////// | /////////////////////////////////// | ||||
// copy the Design Tool code here | // copy the Design Tool code here | ||||
/////////////////////////////////// | /////////////////////////////////// |
// copy the Design Tool code here | // 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() { | void setup() { |
Bounce button2 = Bounce(2, 15); | Bounce button2 = Bounce(2, 15); | ||||
/////////////////////////////////// | /////////////////////////////////// | ||||
// copy the Design Tool code here | // copy the Design Tool code here | ||||
/////////////////////////////////// | /////////////////////////////////// |