|
|
před 7 roky | |
|---|---|---|
| .. | ||
| main | před 7 roky | |
| CMakeLists.txt | před 7 roky | |
| Makefile | před 8 roky | |
| README.md | před 7 roky | |
(See the README.md file in the upper level 'examples' directory for more information about examples.)
This example will shows how to configure and operate the remote control (RMT) peripheral to transmit a sample message in the Morse code, it also shows how to transmit custom format of data.
Connection :
330R LED
GPIO18 +----/\/\/\----+------|>|-----+ GND
|
| /|
+-+ | Speaker
| | | or
+-+ | earphone
| \|
|
+--------------+ GND
make menuconfig
Build the project and flash it to the board, then run monitor tool to view serial output:
make -j4 flash monitor
(To exit the serial monitor, type Ctrl-].)
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
To be able to see and hear the message output by the RMT, connect a LED and a speaker or an earphone (be careful - it may be loud) to the GPIO18(the pin can be changed by modify the definition of RMT_TX_GPIO in main/rmt_tx_main.c).
Run this example, you will see the following output log:
RMT Tx: Transmission complete
RMT Tx: Sample transmission complete
Programming fail
make monitor, and reboot your board to see if there is any output logs.menuconfig menu, and try again.For any technical queries, please open an issue on GitHub. We will get back to you soon.