esphome-docs/esphomeyaml/components/output/ledc.rst

47 lines
1.8 KiB
ReStructuredText
Raw Normal View History

2018-05-13 11:37:02 +02:00
ESP32 LEDC Output
=================
2018-11-14 22:12:27 +01:00
.. seo::
:description: Instructions for setting up LEDC hardware PWM outputs on the ESP32.
:image: pwm.png
2018-05-13 11:37:02 +02:00
The LEDC output component exposes a `LEDC PWM
channel <https://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/ledc.html>`__
of the ESP32 as an output component.
.. code:: yaml
# Example configuration entry
output:
- platform: ledc
pin: 19
2018-06-01 18:10:00 +02:00
id: gpio_19
2018-05-13 11:37:02 +02:00
Configuration variables:
2018-10-12 16:33:22 +02:00
------------------------
2018-05-13 11:37:02 +02:00
2018-06-01 18:10:00 +02:00
- **pin** (**Required**, :ref:`config-pin`): The pin to use LEDC on. Can only be GPIO0-GPIO33.
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
- **frequency** (*Optional*, float): At which frequency to run the LEDC
channels timer. Two LEDC channels always share the same timer and
therefore also the same frequency. Defaults to 1000Hz.
- **bit_depth** (*Optional*, int): The bit depth to use for the LEDC channel. Defaults to 12.
- **channel** (*Optional*, int): Manually set the `LEDC
channel <https://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/ledc.html#configure-channel>`__
to use. Two adjacent channels share the same timer. Defaults to an automatic selection.
- All other options from :ref:`Output <config-output>`.
See Also
2018-10-12 16:33:22 +02:00
--------
2018-06-01 18:10:00 +02:00
- :doc:`/esphomeyaml/components/output/index`
- :doc:`/esphomeyaml/components/output/esp8266_pwm`
- :doc:`/esphomeyaml/components/light/monochromatic`
- :doc:`/esphomeyaml/components/fan/speed`
- :doc:`/esphomeyaml/components/power_supply`
- :doc:`API Reference </api/output/ledc>`
2018-08-24 22:44:01 +02:00
- `esp-idf LEDC API docs <https://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/ledc.html>`__
2018-06-04 08:17:22 +02:00
- `Edit this page on GitHub <https://github.com/OttoWinter/esphomedocs/blob/current/esphomeyaml/components/output/ledc.rst>`__
2018-10-12 16:33:22 +02:00
.. disqus::