esp-idf-m5stack-speaker

Example to ring the speaker of M5Stack with esp-idf

MIT License

Stars
2

esp-idf-m5stack-speaker

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

Software requirements

esp-idf ver4.1 or later.

Hardware requirements

M5Stack

Install

git clone https://github.com/nopnop2002/esp-idf-m5stack-speaker
cd esp-idf-m5stack-speaker
idf.py menuconfig
idf.py flash monitor

Firmware configuration

You have to set this config value using menuconfig.

  • CONFIG_BEEP_FREQUENCY
    BEEP frequency.
  • CONFIG_BEEP_DURATION
    BEEP duration.
  • CONFIG_ESP_FONT
    The font to use.

Operation

  • Left button is beep.

  • Middle button play Doremi.

  • Right button start alarm. Stops when pressed again.