|
|
7 سال پیش | |
|---|---|---|
| .. | ||
| main | 7 سال پیش | |
| CMakeLists.txt | 7 سال پیش | |
| Makefile | 9 سال پیش | |
| README.md | 7 سال پیش | |
(See the README.md file in the upper level 'examples' directory for more information about examples.)
This example shows how to control intensity of LEDs using ESP32's on-board hardware LED PWM Controller module.
Connect four LEDs to the following LEDC channels / individual GPIOs:
| ledc channel | GPIO |
|---|---|
| channel 0 | GPIO18 |
| channel 1 | GPIO19 |
| channel 2 | GPIO4 |
| channel 3 | GPIO5 |
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.
Running this example, you will see each ledc's brightness changes differently
you can also see the following output log on the serial monitor:
1. LEDC fade up to duty = 4000
2. LEDC fade down to duty = 0
3. LEDC set duty = 4000 without fade
4. LEDC set duty = 0 without fade
...
Programming fail
make monitor, and reboot your board to see if there are 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.