mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-11-09 10:02:45 +01:00
41 lines
1.4 KiB
ReStructuredText
41 lines
1.4 KiB
ReStructuredText
PCA9685 PWM Component
|
|
=====================
|
|
|
|
The PCA9685 component represents a PCA9685 12-bit PWM driver
|
|
(`datasheet <https://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/ledc.html#configure-channel>`__,
|
|
`adafruit <https://www.adafruit.com/product/815>`__) in esphomelib. It
|
|
uses `I²C Bus </esphomeyaml/components/i2c.html>`__ for communication.
|
|
|
|
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
|
|
`individual output channels </esphomeyaml/components/output/pca9685>`__.
|
|
|
|
.. code:: yaml
|
|
|
|
# Example configuration entry
|
|
pca9685:
|
|
- id: 'pca9685_hub1'
|
|
frequency: 500
|
|
|
|
# Individual outputs
|
|
output:
|
|
- platform: pca9685
|
|
id: 'pca9685_output1'
|
|
pca9685_id: 'pca9685_hub1'
|
|
channel: 0
|
|
|
|
Configuration variables:
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- **id** (**Required**,
|
|
`id </esphomeyaml/configuration-types.html#id>`__): The id to use for
|
|
this pca9685 component.
|
|
- **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``.
|
|
- **phase_balancer** (*Optional*): The phase balancer to balance the
|
|
phases of several channels. One of ``None``, ``Linear`` or
|
|
``Weaved``. Defaults to ``None``.
|