esphome-docs/components/pca9685.rst

49 lines
1.4 KiB
ReStructuredText
Raw Normal View History

2018-05-13 11:37:02 +02:00
PCA9685 PWM Component
=====================
2018-11-14 22:12:27 +01:00
.. seo::
:description: Instructions for setting up PCA9685 LED PWM drivers.
:image: pca9685.jpg
:keywords: PCA9685
2018-05-13 11:37:02 +02:00
The PCA9685 component represents a PCA9685 12-bit PWM driver
(`datasheet <https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/ledc.html#configure-channel>`__,
2019-02-16 23:25:23 +01:00
`adafruit <https://www.adafruit.com/product/815>`__) in ESPHome. It
2018-06-01 18:10:00 +02:00
uses :ref:`I²C Bus <i2c>` for communication.
2018-05-13 11:37:02 +02:00
To use the channels of this components, you first need to setup the
global ``pca9685`` hub and give it an id, and then define the
:doc:`individual output channels </components/output/pca9685>`.
2018-05-13 11:37:02 +02:00
.. code-block:: yaml
2018-05-13 11:37:02 +02:00
# Example configuration entry
pca9685:
2018-06-06 09:49:19 +02:00
frequency: 500
2018-05-13 11:37:02 +02:00
# Individual outputs
output:
- platform: pca9685
pca9685_id: 'pca9685_hub1'
channel: 0
Configuration variables:
2018-08-24 22:44:01 +02:00
------------------------
2018-05-13 11:37:02 +02:00
- **frequency** (**Required**, float): The frequency to let the
component drive all PWM outputs at. Must be in range from 24Hz to
1526Hz.
- **address** (*Optional*, int): The I²C address of the driver.
Defaults to ``0x00``.
2018-06-06 09:49:19 +02:00
- **id** (*Optional*, :ref:`config-id`): The id to use for
this pca9685 component. Use this if you have multiple PCA9685s connected at the same time
2018-06-01 18:10:00 +02:00
See Also
--------
- :doc:`output/pca9685`
- :apiref:`output/pca9685_output_component.h`
- :ghedit:`Edit`
2018-10-12 16:33:22 +02:00
.. disqus::