Closed lucyknada closed 2 months ago
Found other docs that had setPinsPdmRx
but that still just reports 34601
#include <ESP_I2S.h>
I2SClass I2S;
void setup() {
Serial.begin(19200);
I2S.setPinsPdmRx(42, 41);
I2S.begin(I2S_MODE_PDM_RX, 16000, I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_MONO);
}
void loop() {
delay(1000);
int sample = I2S.read();
if (sample && sample != -1 && sample != 1) {
Serial.println(sample);
}
}
Full flash wipe seems to have fixed it and made the second example posted above work.
Board
esp32-s3 [sense] (seed, xiao)
Device Description
device itself: https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html
device schematic: https://files.seeedstudio.com/wiki/SeeedStudio-XIAO-ESP32S3/res/XIAO_ESP32S3_SCH_v1.1.pdf
expansion board (with mems mic) schematic: https://files.seeedstudio.com/wiki/SeeedStudio-XIAO-ESP32S3/res/XIAO_ESP32S3_ExpBoard_v1.0_SCH.pdf
Hardware Configuration
expansion board mems microphone via: pin 42 ws, pin 41 pdm-clock, pin 7 sck
Version
latest master (checkout manually)
IDE Name
arduino ide and platformio
Operating System
macOS
Description
I tried to port the v2 example here: https://wiki.seeedstudio.com/xiao_esp32s3_sense_mic/#detection-of-sound-loudness to v3, it does not matter if I set BCLK to -1 or 7 (SCK) as it always reports 34601 on i2s.read()
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide