mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
da471dfcd1
Updated main examples README to add missing examples folders and Getting Started links Updated wifi/fastscan example README Updated wifi examples README Updated wifi main examples README Added instructions and removed obviousness from examples README Updates on example README in peripherals, system and wifi Updates on example README in peripherals and added wave form pictures on wave_gen example Updates and review on example README Revision on unit style convention Added the getting started link for each supported version Readme review and recommended enhancements Added the default note on the wave form option info Added the ESP32-C3 support information on the temperature sensor example README Added Getting Started information for ESP32-S2 and ESP32-C3 Issue fixed on the supported target on README Resolved merge conflict
67 lines
2.2 KiB
Markdown
67 lines
2.2 KiB
Markdown
# RMT Transmit Example -- Morse Code
|
|
|
|
(See the README.md file in the upper level 'examples' directory for more information about examples.)
|
|
|
|
This example mainly illustrates how to transmit the [Morse code](https://en.wikipedia.org/wiki/Morse_code) using the RMT driver.
|
|
|
|
## How to Use Example
|
|
|
|
### Hardware Required
|
|
|
|
* A development board with ESP32 SoC (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.)
|
|
* A USB cable for Power supply and programming
|
|
* A LED, a speaker or an earphone
|
|
|
|
Connection :
|
|
|
|
```
|
|
330R LED
|
|
GPIO18 +----/\/\/\----+------|>|-----+ GND
|
|
|
|
|
| /|
|
|
+-+ | Speaker
|
|
| | | or
|
|
+-+ | earphone
|
|
| \|
|
|
|
|
|
+--------------+ GND
|
|
```
|
|
|
|
### Configure the Project
|
|
|
|
Open the project configuration menu (`idf.py menuconfig`).
|
|
|
|
In the `Example Configuration` menu:
|
|
|
|
* Set the GPIO number used for transmitting the IR signal under `RMT TX GPIO` optin.
|
|
|
|
### Build and Flash
|
|
|
|
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 all the steps to configure and use the ESP-IDF to build projects.
|
|
|
|
* [ESP-IDF Getting Started Guide on ESP32](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html)
|
|
* [ESP-IDF Getting Started Guide on ESP32-S2](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html)
|
|
* [ESP-IDF Getting Started Guide on ESP32-C3](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/get-started/index.html)
|
|
|
|
|
|
## Example Output
|
|
|
|
To be able to see and hear the message output by the RMT, connect an LED and a speaker or an earphone (be careful it might make a large noise) to the GPIO you set in the menuconfig.
|
|
|
|
Run the example, you will see the following output log:
|
|
|
|
``` bash
|
|
...
|
|
I (304) example: Configuring transmitter
|
|
I (2814) example: Transmission complete
|
|
...
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
|