diff --git a/components/output/images/tlc5947.jpg b/components/output/images/tlc5947.jpg new file mode 100644 index 000000000..fd4bf255f Binary files /dev/null and b/components/output/images/tlc5947.jpg differ diff --git a/components/output/tlc5947.rst b/components/output/tlc5947.rst new file mode 100644 index 000000000..40022ea52 --- /dev/null +++ b/components/output/tlc5947.rst @@ -0,0 +1,105 @@ +TLC5947 LED driver +================== + +.. seo:: + :description: Instructions for setting up TLC5947 LED drivers in ESPHome. + :image: images/tlc5947.jpg + :keywords: tlc5947, + +.. _tlc5947-component: + +Component/Hub +------------- +.. figure:: images/tlc5947.jpg + :align: center + :width: 75.0% + + Adafruit's TLC5947 board + +This component represents a chain of `TLC5947 24-Channel, 12-Bit PWM LED Drivers `_, +which is used e.g. on this `board from Adafruit `_. + +To use the channels of this components, you first need to setup the +global ``tlc5947`` hub and give it an id, and then define the +:ref:`individual output channels `. + +.. code-block:: yaml + + # Example configuration entry + tlc5947: + data_pin: GPIO12 + clock_pin: GPIO14 + lat_pin: GPIO15 + + # Individual outputs + output: + - platform: tlc5947 + id: output_red + channel: 0 + - platform: tlc5947 + id: output_green + channel: 1 + - platform: tlc5947 + id: output_blue + channel: 2 + +Configuration variables: +************************ + +- **data_pin** (**Required**, :ref:`config-pin_schema`): The pin connected to DIN. +- **clock_pin** (**Required**, :ref:`config-pin_schema`): The pin connected to CLK. +- **lat_pin** (**Required**, :ref:`config-pin_schema`): The pin connected to LAT. +- **oe_pin** (*Optional*, :ref:`config-pin_schema`): The pin connected to /OE (BLANK). +- **num_chips** (*Optional*, int): Number of chips in the chain. Must be + in range from 1 to 85. Defaults to 1. +- **id** (*Optional*, :ref:`config-id`): The id to use for + this ``tlc5947`` component. Use this if you have multiple TLC5947 chains + connected at the same time. + +.. _tlc5947-output: + +Output +------ + +The tlc5947 output component exposes a tlc5947 channel of a global +:ref:`tlc5947-component` as a float output. + +.. code-block:: yaml + + # Example configuration entry + tlc5947: + data_pin: GPIO12 + clock_pin: GPIO14 + lat_pin: GPIO15 + + # Individual outputs + output: + - platform: tlc5947 + id: output_red + channel: 0 + - platform: tlc5947 + id: output_green + channel: 1 + - platform: tlc5947 + id: output_blue + channel: 2 + +Configuration variables: +************************ + +- **id** (**Required**, :ref:`config-id`): The id to use for this output component. +- **channel** (**Required**, int): Chose the channel of the TLC5947 chain of + this output component. +- **tlc5947_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the + :ref:`TLC5947-component`. + Use this if you have multiple TLC5947 chains you want to use at the same time. +- All other options from :ref:`Output `. + +See Also +-------- + +- :doc:`/components/output/index` +- :doc:`/components/light/monochromatic` +- :doc:`/components/power_supply` +- :apiref:`tlc5947/tlc5947.h` +- :ghedit:`Edit` diff --git a/images/tlc5947.jpg b/images/tlc5947.jpg new file mode 100644 index 000000000..fd4bf255f Binary files /dev/null and b/images/tlc5947.jpg differ diff --git a/index.rst b/index.rst index 60bc6eb81..33675ea2e 100644 --- a/index.rst +++ b/index.rst @@ -286,6 +286,7 @@ Output Components AC Dimmer, components/output/ac_dimmer, ac_dimmer.svg PCA9685, components/output/pca9685, pca9685.jpg TLC59208F, components/output/tlc59208f, tlc59208f.jpg + TLC5947, components/output/tlc5947, tlc5947.jpg MY9231/MY9291, components/output/my9231, my9231.svg SM16716, components/output/sm16716, sm16716.svg SM2135, components/output/sm2135, sm2135.svg