Example to ring the speaker of M5Stack with esp-idf
MIT License
Example to ring the speaker of M5Stack with esp-idf. I ported from Arduino core for M5Stack.
The buzzer needs enough current. If there is not enough current, Brownout will occur. ESP32 has a built-in brownout detector, which is enabled by default. Brownout detector can trigger system reset if supply voltage goes below safe level.
Brownout detector was triggered
ets Jun 8 2016 00:22:57
esp-idf ver4.1 or later.
M5Stack
git clone https://github.com/nopnop2002/esp-idf-m5stack-speaker
cd esp-idf-m5stack-speaker
idf.py menuconfig
idf.py flash monitor
You have to set this config value using menuconfig.
Left button is beep.
Middle button play Doremi.
Right button start alarm. Stops when pressed again.