esp-idf/examples/peripherals/ledc
Angus Gratton 821c70f5d7 examples: Standardise naming of files, symbols, etc. in examples
* Use "example" in all example function & variable names,
  ie use i2c_example_xxx instead of i2c_xxx for example functions.
  Closes #198 https://github.com/espressif/esp-idf/issues/198
* Mark example functions, etc. static
* Replace uses of "test" & "demo" with "example"
* Split the UART example into two
* Rename "main" example files to end with "_main.c" for disambiguation
2017-03-27 17:42:05 +11:00
..
main examples: Standardise naming of files, symbols, etc. in examples 2017-03-27 17:42:05 +11:00
Makefile Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00
README.md Feature: add ledc low speed channels 2017-03-17 17:26:30 +08:00

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.