721
edits
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
# check out the teensy web ide patches: https://www.pjrc.com/teensy/gui/ | # check out the teensy web ide patches: https://www.pjrc.com/teensy/gui/ | ||
#*add the following nodes from the gui: | #* add the following nodes from the gui: | ||
#*#from "input" add "i2s" | #*# from "input" add "i2s" | ||
#*#from "output" add "i2s" | #*# from "output" add "i2s" | ||
#*#from "control" add "sgtl5000" | #*# from "control" add "sgtl5000" | ||
[[File:teensy_webinterface.png|thumb|730px|Audio System Design Tool "Audio through patch"]] | [[File:teensy_webinterface.png|thumb|730px|Audio System Design Tool "Audio through patch"]] | ||
# Click the export button to generate the setup code for your teensy and paste it in your Arduino IDE patch! | |||
# In the setup routine of the arduino IDE you need code to choose the microphone port and audio levels. It should look more or less like this: | |||
void setup() { | |||
// Audio connections require memory to work. For more | |||
// detailed information, see the MemoryAndCpuUsage example | |||
AudioMemory(8); | |||
// Enable the audio shield and set the output volume. | |||
sgtl5000_1.enable(); | |||
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC); | |||
sgtl5000_1.micGain(36); //from 0dB 40dB | |||
sgtl5000_1.volume(0.8); // from 0.0 to 1.0 // 0.8 standard | |||
} | |||
# Press upload and compile the patch. |