Does NoteAnalyzeFrequency need the audio shield?

Status
Not open for further replies.

132ikl

New member
Do you need to hook up the audio shield or DAC of the Teensy in order for AudioAnalyzeNoteFrequency to work? I uploaded NoteFrequency example sketch to my Teensy and Serial never output anything, and when I printed out notefreq.available() it always returned 0. I'm getting the audio shield soon enough, I just wanted to check ahead of time to see if I'm doing something wrong or if you do need to hook up the DAC/Audio shield in order for the example sketch to work. This is on a Teensy 4.0 using Arduino IDE on Linux.
 
You don't need the audio shield, but you must have at least 1 hardware input or output, other than USB. The input & output objects have "update responsibility" which causes the entire audio library to run.

You don't have to actually use the input or output. Simply having it in your design, even if unconnected to the rest of your audio system, is perfectly fine. Just creating the object instance causes it to initialize hardware and generate the software interrupts which cause the entire library to run.
 
Status
Not open for further replies.
Back
Top