Hi,
it seems to me that something in the i2s part of the audio library is broken, here is my code:
This doesn't work any more in beta, instead I have to use i2sQuad (which doesn't work in stable). The following doesn't work either in stable and beta regardless of i2s or i2sQuad:
I use the Adafruit SPH0645 mems mic as input connected to a teensy 4 without the MCLK pin wired.
it seems to me that something in the i2s part of the audio library is broken, here is my code:
Code:
#include <Audio.h>
AudioInputI2S input;
AudioAnalyzeNoteFrequency notefreq;
AudioConnection connection(input, 0, notefreq, 0);
void setup() {
AudioMemory(50);
notefreq.begin(0.15);
}
void loop() {
if (notefreq.available()) Serial.println(notefreq.read());
}
This doesn't work any more in beta, instead I have to use i2sQuad (which doesn't work in stable). The following doesn't work either in stable and beta regardless of i2s or i2sQuad:
Code:
#include <Audio.h>
AudioInputI2S input;
// AudioInputI2SQuad input;
AudioAnalyzeFFT1024 fft;
AudioConnection connection(input, 0, fft, 0);
void setup() {
AudioMemory(50);
}
// copied from the fft example:
void loop() {
float n;
int i;
if (fft.available()) {
// each time new FFT data is available
// print it all to the Arduino Serial Monitor
Serial.print("FFT: ");
for (i = 0; i < 40; i++) {
n = fft.read(i);
if (n >= 0.01) {
Serial.print(n);
Serial.print(" ");
} else {
Serial.print(" - "); // don't print "0.00"
}
}
Serial.println();
}
}
I use the Adafruit SPH0645 mems mic as input connected to a teensy 4 without the MCLK pin wired.