Unable to use audio library for ADC input of teensy4.0

Status
Not open for further replies.

Lelouch

New member
Hello all,
I recently bought a teensy4.0 for an audio-reactive display project.

I have connected the MAX9814 electret microphone to pin 16(A2) of teensy 4.0, along with the recommended audio input circuitry. But still, I am not able to run even the PeakMeterMono example sketch.
The ouput on the serial monitor shows: "adc2_cfg = 00000637".
Any pointers to fix this issue?
 
Opened up the PeakMeterMono sketch and uploaded it to a Teensy 4.0 and got the same "adc2_cfg = 00000637" message in the serial monitor.
Mind you, I don't have a MAX9814 electret microphone so pin A2(16) is open.
I inserted some serial.print's and it looks like it (peak1.available()) never becomes TRUE.

Code:
void loop() {
  Serial.println("state1");
  if (fps > 24) {
    Serial.println("state2");
    if (peak1.available()) {
      Serial.println("state3");
      fps = 0;
      int monoPeak = peak1.read() * 30.0;
      Serial.print("|");
      for (int cnt=0; cnt<monoPeak; cnt++) {
        Serial.print(">");
      }
      Serial.println();
    }
  }
}
I could dive into the code but perhaps there is someone on the forum that dealt with this before? I saw this message but it wasn't answered.

Paul
 
Status
Not open for further replies.
Back
Top