SPI RGB LED component description (#3147)
* APA102 description * Add note about miso * Rename apa102 to spi_rgb_led * Rename to spi_led_strip * Update TOC, add reference to SPI LED Strip in Fastled doc. * More cross-refs * Add image * Resize image * Format. * Formatting...
This commit is contained in:
parent
f36ded648e
commit
28758a9b85
|
@ -24,7 +24,7 @@ FastLED Light
|
|||
|
||||
FastLED does **not** work with ESP-IDF.
|
||||
|
||||
For addressable lights, you can use :doc:`esp32_rmt_led_strip`.
|
||||
For addressable lights, you can use :doc:`esp32_rmt_led_strip` or for SPI LEDs see :doc:`spi_led_strip`..
|
||||
|
||||
.. _fastled-clockless:
|
||||
|
||||
|
@ -110,6 +110,8 @@ SPI
|
|||
The ``fastled_spi`` light platform allows you to create RGB lights
|
||||
in ESPHome for a :ref:`number of supported chipsets <fastled_spi-chipsets>`.
|
||||
|
||||
See :doc:`/components/light/spi_led_strip` for an alternative component that works on ESP-IDF (and Arduino.)
|
||||
|
||||
SPI FastLED lights differ from the
|
||||
:ref:`fastled-clockless` in that they require two pins to be connected, one for a data and one for a clock signal
|
||||
whereas the clockless lights only need a single pin.
|
||||
|
@ -169,6 +171,7 @@ See Also
|
|||
--------
|
||||
|
||||
- :doc:`/components/light/index`
|
||||
- :doc:`/components/light/spi_led_strip`
|
||||
- :doc:`/components/power_supply`
|
||||
- :apiref:`fastled_base/fastled_light.h`
|
||||
- `Arduino FastLED library <https://github.com/FastLED/FastLED>`__
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
|
@ -9,7 +9,8 @@ NeoPixelBus Light
|
|||
|
||||
NeoPixelBus does **not** work with ESP-IDF.
|
||||
|
||||
For addressable lights, you can use :doc:`esp32_rmt_led_strip`.
|
||||
For clockless lights, you can use :doc:`esp32_rmt_led_strip`, and for SPI LEDs see :doc:`spi_led_strip`.
|
||||
|
||||
|
||||
The ``neopixelbus`` light platform allows you to create RGB lights
|
||||
in ESPHome for an individually addressable lights like NeoPixel or WS2812.
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
SPI LED Strip Light
|
||||
===================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up SPI LED RGB lights in ESPHome.
|
||||
:image: ../components/light/images/apa102.jpg
|
||||
|
||||
The ``spi_led_strip`` light platform drives one or more SPI interfaced RGB LEDs. These LEDs are often used in strips, where
|
||||
each LED is individually addressable. This component requires an SPI interface to be configured.
|
||||
|
||||
This component has been tested with APA102 LEDs and should also work with HD107 and SK9822 type LEDs, or any others
|
||||
with a similar interface - SPI, 8 bits per colour and BGR ordering.
|
||||
|
||||
.. figure:: images/apa102.jpg
|
||||
:align: center
|
||||
:width: 75.0%
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
spi:
|
||||
mosi_pin: GPIO3
|
||||
clk_pin: GPIO9
|
||||
|
||||
light:
|
||||
- platform: spi_led_strip
|
||||
num_leds: 30
|
||||
color_correct: [80%, 60%, 100%]
|
||||
id: rgb_led
|
||||
name: "RGB LED Strip"
|
||||
data_rate: 1MHz
|
||||
|
||||
Color Correction
|
||||
----------------
|
||||
|
||||
It is often favourable to calibrate/correct the color produced by an LED strip light as the
|
||||
perceived intensity of different colors will generally vary. This can be done by using
|
||||
``color_correct`` to adjust the relative brightness of the RGB components.
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **name** (**Required**, string): The name of the light.
|
||||
- **num_leds** (*Optional*, int): The number of LEDs attached. The default is 1.
|
||||
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- **data_rate** (*Optional*): Set the data rate of the SPI interface to the display. One of ``80MHz``, ``40MHz``, ``20MHz``, ``10MHz``, ``5MHz``, ``2MHz``, ``1MHz`` (default), ``200kHz``, ``75kHz`` or ``1kHz``.
|
||||
- All other options from :ref:`Light <config-light>`.
|
||||
|
||||
You may also need to configure an ``output`` GPIO pin to control power to the LEDs, depending on your hardware. The
|
||||
APA102 and friends do not have a ``CS`` input, and are write-only so the SPI ``miso`` pin should not be specified.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
.. figure:: images/rgb-detail.jpg
|
||||
:align: center
|
||||
:width: 75.0%
|
||||
|
||||
- :doc:`/components/light/index`
|
||||
- :doc:`/components/output/ledc`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :doc:`/components/output/pca9685`
|
||||
- :doc:`/components/output/tlc59208f`
|
||||
- :doc:`/components/output/my9231`
|
||||
- :doc:`/components/output/sm16716`
|
||||
- :apiref:`rgb/rgb_light_output.h`
|
||||
- :ghedit:`Edit`
|
Binary file not shown.
After Width: | Height: | Size: 9.7 KiB |
|
@ -547,6 +547,7 @@ Light Components
|
|||
FastLED Light, components/light/fastled, color_lens.svg, dark-invert
|
||||
NeoPixelBus Light, components/light/neopixelbus, color_lens.svg, dark-invert
|
||||
Light Partition, components/light/partition, color_lens.svg, dark-invert
|
||||
SPI LED Strips, components/light/spi_led_strip, apa102.jpg
|
||||
|
||||
Tuya Dimmer, components/light/tuya, tuya.png
|
||||
Shelly Dimmer, components/light/shelly_dimmer, shellydimmer2.jpg
|
||||
|
|
Loading…
Reference in New Issue