OVMS3-idf/examples/peripherals/ledc/README.md
Wangjialin 7670e93639 Feature: add ledc low speed channels
1. Add low speed channels for LEDC module.
2. Improve fade object allocate mechanism.
3. Improve ledc example, add 2 low speed channels in example.
4. Remove debug code
5. Improve the register bit field name of slow clock.
2017-03-17 17:26:30 +08:00

17 lines
604 B
Markdown

# LEDC(LED control) Example
###This example shows:
* init LEDC module:
a. You need to set the timer of LEDC first, this decide the frequency and resolution of PWM.
b. You need to set the LEDC channel you want to use, and bind the channel with one of the timers.
* You can install a default fade function, then you can use fade APIs.
* You can also set a target duty directly without fading.
* This example use GPIO18/19/4/5 as LEDC ouput, and it will change the duty repeatedly.
* GPIO18/19 are from high speed channel group. GPIO4/5 are from low speed channel group.