Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Does NoteAnalyzeFrequency need the audio shield?

  1. #1
    Junior Member 132ikl's Avatar
    Join Date
    Jul 2021
    Posts
    3

    Does NoteAnalyzeFrequency need the audio shield?

    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.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,784
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •