https://github.com/nopnop2002/esp-idf-m5stack-speaker
Example to ring the speaker of M5Stack with esp-idf
https://github.com/nopnop2002/esp-idf-m5stack-speaker
beep buzzer esp-idf esp32 m5stack speaker tone
Last synced: about 1 year ago
JSON representation
Example to ring the speaker of M5Stack with esp-idf
- Host: GitHub
- URL: https://github.com/nopnop2002/esp-idf-m5stack-speaker
- Owner: nopnop2002
- License: mit
- Created: 2020-12-10T12:07:20.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-27T21:48:19.000Z (almost 2 years ago)
- Last Synced: 2025-03-17T09:05:20.170Z (about 1 year ago)
- Topics: beep, buzzer, esp-idf, esp32, m5stack, speaker, tone
- Language: C
- Homepage:
- Size: 62.5 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.