Forum Rule: Always post complete source code & details to reproduce any issue!
-
Teensy 4 audio - ADC input not working
Hi everyone,
I got trouble to get the audio ADC input working with a teensy 4.1. I have tried the PeakMeterMono example in combination with the ADC example circuit (https://www.pjrc.com/teensy/gui/img/adccircuit.png)
Code:
void loop() {
// if (fps > 24) {
if (peak1.available()) {
fps = 0;
int monoPeak = peak1.read() * 30.0;
Serial.print("|");
for (int cnt=0; cnt<monoPeak; cnt++) {
Serial.print(">");
}
Serial.println();
}
// }
}
My hardware setup works fine with this code when I use a Teensy 3.2. However, with a Teensy 4 simply nothing happens. Apparently peak1.available() is never true. I suspect the initialisation of the ADC failed somehow. Has anyone an idea how to resolve this?
So far, I have tried a fresh Arduino 1.8.19 and Teensyduino 1.56 installation. I have read here that the "ADC does not work good", but does it work at all?
Best regards,
Christian
-
I'm also having this issue with 4.1
Seems there is limited input audio ADC support for 4.x
-
I bought a few audio adaptor boards and added an electret microphone (adafruit 1064). With this setup, the PassThroughStereo example worked out of the box.
-

Originally Posted by
cmteuffel
I bought a few audio adaptor boards and added an electret microphone (adafruit 1064). With this setup, the PassThroughStereo example worked out of the box.
Seems the i2S board you got made it work.
There is an update to the library (beta). I'll be checking it out.
-
Senior Member
If you use the latest from github, remember to have at least 1 other input or output with "update responsibility", as the ADC input can't do that on Teensy 4. Any I2S or MQS works, even if unused.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules