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

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

  1. #1
    Junior Member
    Join Date
    Jan 2021
    Posts
    2

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

    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?

  2. #2
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    498
    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

  3. #3
    Junior Member
    Join Date
    Jan 2021
    Posts
    2
    Thanks for the reply Paul.
    So only way is to tweak the audio library?

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,474
    See this post thread for PJRC notes : List-of-supported-Audio-Lib-Hardware?p=267309&viewfull=1#post267309

    Does that relate?

Posting Permissions

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