(See the README.md file in the upper level 'examples' directory for more information about examples.)
This example illustrates how to encode and decode RMT signals with/to common IR protocols (e.g. NEC and RC5).
[NEC](https://www.sbprojects.net/knowledge/ir/nec.php) and [RC5](https://www.sbprojects.net/knowledge/ir/rc5.php) have different encoding rules, but both can be compatible to RMT data format.
The example supports building and parsing both normal and extended NEC/RC5 protocol. And also supports `repeat code` which would be sent out if one remote key got pressed for a specific long time.
## How to Use Example
### Hardware Required
* A development board with ESP32 SoC (e.g. ESP32-DevKitC or ESP-WROVER-KIT)
* An USB cable for power supply and programming
* A 5mm infrared LED (e.g. IR333C) used to transmit encoded IR signals
* An infrared receiver module (e.g. IRM-3638T), which integrates a demodulator and AGC circuit.
Example connection :
| ESP32 | IR333C | IRM-3638T |
| -------- | ------ | --------- |
| GPIO18 | Tx | × |
| GPIO19 | × | Rx |
| VCC 5V | √ | × |
| VCC 3.3V | × | √ |
| GND | GND | GND |
### Configure the Project
Open the project configuration menu (`idf.py menuconfig`).