Hi,
I'm trying to read data from I2S microphone without the audio board, but even though I checked all the posts and samples it still doesn't work.
I'm using the Teensy 3.6 and EMMIC-ICS43434 microphone.
Connected SCK (clock) to pin 15, SD (data) to 13, WS (word select) to 14, 3.3v and ground to their places.
this is the code I've tried:
I also tried to patch I2S -> Print or peak, but I see no values. Either the microphone has a problem or (more likely) I'm doing something wrong.
Thanks!
I'm trying to read data from I2S microphone without the audio board, but even though I checked all the posts and samples it still doesn't work.
I'm using the Teensy 3.6 and EMMIC-ICS43434 microphone.
Connected SCK (clock) to pin 15, SD (data) to 13, WS (word select) to 14, 3.3v and ground to their places.
this is the code I've tried:
Code:
#include <Audio.h>
#include <Wire.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=207.1999969482422,130.1999969482422
AudioRecordQueue queue1; //xy=281,63
AudioConnection patchCord1(i2s1, 0, queue1, 0);
// GUItool: end automatically generated code
void setup() {
Serial.begin(38400);
AudioMemory(60);
SIM_SCGC6 |= SIM_SCGC6_I2S; // enable clock to the I2S module
CORE_PIN13_CONFIG = PORT_PCR_DSE | PORT_PCR_MUX(4); // I2S0_TXD0 //13 - data
CORE_PIN14_CONFIG = PORT_PCR_DSE | PORT_PCR_MUX(4); // I2S0_TX_FS //14 - frame sync
CORE_PIN15_CONFIG = PORT_PCR_DSE | PORT_PCR_MUX(4); // I2S0_TX_BCLK //15 - clock
queue1.begin();
}
void loop() {
byte buffer[512];
memcpy(buffer, queue1.readBuffer(), 256);
queue1.freeBuffer();
Serial.println(*buffer);
delay(250);
}
I also tried to patch I2S -> Print or peak, but I see no values. Either the microphone has a problem or (more likely) I'm doing something wrong.
Thanks!