Hello! I have been working through a number of microphones to get FFT working from the Teensy 4.0. All of the code worked great with the i2s microphone, but then I found out it spoiled the timing for writing to WS2813 LEDs. Then I decided to make the modification to an Adafruit MAX4466 microphone to use it for FFT. However, according to this thread (comment 15) Paul Stoffregen replied:
So the ADC need some type of external timing regulation. However, when I fire up a basic FFT program I get the following results.
1. analogRead(A7): .6V biased signal that responds to audio
2. ADC -> FFT without i2s: no data.
3. ADC -> FFT with i2s: data that does not respond to sound
So in this case, the i2s makes the FFT return data, just not useful data. As I mentioned earlier, i2s breaks the LEDs anyway, so another "I/O object that causes the library to update" would be preferable.
The sketch I have been using is this: View attachment analog_erad.ino.
I would really appreciate hearing what may be done to get ADC -> FFT working on the 4.0. Thanks a lot for any help you are able to provide on this one.
edit: Looks like having "AudioInputI2S i2s1; " in the sketch garbles the analogread() output. Goes from solid .6V to a random low value.
"This will work without the audio shield present, but I2S output (or any other I/O object that causes the library to update) is currently required. Future versions will remove this requirement."
So the ADC need some type of external timing regulation. However, when I fire up a basic FFT program I get the following results.
1. analogRead(A7): .6V biased signal that responds to audio
3. ADC -> FFT with i2s: data that does not respond to sound
So in this case, the i2s makes the FFT return data, just not useful data. As I mentioned earlier, i2s breaks the LEDs anyway, so another "I/O object that causes the library to update" would be preferable.
The sketch I have been using is this: View attachment analog_erad.ino.
I would really appreciate hearing what may be done to get ADC -> FFT working on the 4.0. Thanks a lot for any help you are able to provide on this one.
edit: Looks like having "AudioInputI2S i2s1; " in the sketch garbles the analogread() output. Goes from solid .6V to a random low value.
Last edited: