You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No microphone examples work on the M5Cardputer #11
#include "driver/gpio.h" // Required for gpio_reset_pin
// Function to switch to Microphone
void switchToMic() {
M5.Speaker.end();
delay(50);
// Critical: Reset I2S pins before switching
gpio_reset_pin(GPIO_NUM_43);
gpio_reset_pin(GPIO_NUM_46);
delay(10);
M5.Mic.begin();
delay(100); // Allow the microphone to stabilize
}
// Function to switch to Speaker
void switchToSpeaker() {
M5.Mic.end();
delay(50);
// Reset pins for the reverse switch as well
gpio_reset_pin(GPIO_NUM_43);
gpio_reset_pin(GPIO_NUM_46);
delay(10);
M5.Speaker.begin();
delay(30);
}
The reason why the microphone has no audio input is that ESP-IDF 5.5.x versions are incompatible; only IDF 5.4.x works properly.Correspondingly, the M5Stack board package version in Arduino needs to be downgraded to 3.2.x.
Note on hardware: this issue describes the original M5Cardputer v1.1 (PDM microphone). My findings below are for the Cardputer-Adv (ES8311 I²S codec) — different hardware, almost certainly different root cause. Posting here only because users hitting silent mic on either device often land here first.
For Cardputer-Adv specifically: silent mic is caused by an ESP-IDF v5.5.1 regression in the I²S driver. Building against IDF v5.4.2 fixes it.
If anyone here has confirmed silent-mic symptoms on the original Cardputer (PDM mic), that's a separate issue and the IDF-version workaround is unlikely to apply.
Activity
brandoncarl commentedon Sep 9, 2025
Linked to m5stack/M5Unified#184
Harrison-Xu commentedon Sep 10, 2025
https://docs.m5stack.com/en/arduino/m5cardputer/mic
Please try this example in M5Stack docs.
brandoncarl commentedon Sep 10, 2025
Hi Harrison. I tried that example. It compiles, uploads and displays on the machine.
However, no audio is recorded nor played back. During "🔴 REC" there is a constant flat line. During "▶️ PLAY" nothing comes out.
brandoncarl commentedon Sep 14, 2025
I was not able to get the demos to work, but was successful in creating this MicStream class. Up to you if you'd like to close.
SCNya commentedon Jan 24, 2026
This helped me
dzy-star commentedon Apr 25, 2026
The reason why the microphone has no audio input is that ESP-IDF 5.5.x versions are incompatible; only IDF 5.4.x works properly.Correspondingly, the M5Stack board package version in Arduino needs to be downgraded to 3.2.x.
chilang commentedon May 14, 2026
Note on hardware: this issue describes the original M5Cardputer v1.1 (PDM microphone). My findings below are for the Cardputer-Adv (ES8311 I²S codec) — different hardware, almost certainly different root cause. Posting here only because users hitting silent mic on either device often land here first.
For Cardputer-Adv specifically: silent mic is caused by an ESP-IDF v5.5.1 regression in the I²S driver. Building against IDF v5.4.2 fixes it.
If anyone here has confirmed silent-mic symptoms on the original Cardputer (PDM mic), that's a separate issue and the IDF-version workaround is unlikely to apply.