|
|
5 ani în urmă | |
|---|---|---|
| .. | ||
| components | 5 ani în urmă | |
| main | 5 ani în urmă | |
| CMakeLists.txt | 5 ani în urmă | |
| README.md | 5 ani în urmă | |
| Supported Targets | ESP32-S2 | ESP32-C3 |
|---|
(See the README.md file in the upper level 'examples' directory for more information about examples.)
RMT peripheral can send customized RMT items in a loop, which means we can use it to generate a configurable length of periodic signal.
This example will show how to drive a passive buzzer to play a simple music, based on the RMT loop feature.
Connection :
VCC +--------------+
| /+
+++ |
| | | Passive Buzzer
+++ |
| \+
|
+ |
+<----+
GPIO +--------+
+-----+
+ |
|
GND +--------------+
Run idf.py -p PORT flash monitor to build, flash and monitor the project.
(To exit the serial monitor, type Ctrl-].)
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
I (325) example: Playing Beethoven's Ode to joy
After you seeing this log, you should hear the music from your buzzer. You can also play other music by updating the notation array in the musical_buzzer_example_main.c.
For any technical queries, please open an issue on GitHub. We will get back to you soon.