|
LightHub 4.6.0
Open-source smart home controller firmware
|
Addressable LED strip driver, SPI-like data protocol (CH_SPILED = 11). More...
#include <out_spiled.h>
Public Member Functions | |
| void | link (Item *_item) |
| Attach to an item and read the strip configuration. | |
| int | Setup () override |
| Allocate and initialize the LED strip (FastLED / Adafruit_NeoPixel). | |
| int | Stop () override |
| Turn off the strip and free the LED buffer. | |
| int | getChanType () override |
| Channel type derived from the LED strip type (RGB or RGBW). | |
| int | PixelCtrl (itemCmd cmd, char *subItem=NULL, bool show=true, bool authorized=false) override |
| Set the LED range (or the whole strip) to ON/OFF or an RGB color and show the result. | |
| Public Member Functions inherited from colorChannel | |
| colorChannel () | |
| Default constructor. | |
| int | Ctrl (itemCmd cmd, char *subItem=NULL, bool toExecute=true, bool authorized=false) override |
| Dispatch /set, /HSV and /cmd ON/OFF commands to PixelCtrl. | |
| short | getChannelAddr (short n=0) |
| Get the pin address of the n-th channel (n=0 - base address). | |
| Public Member Functions inherited from abstractOut | |
| abstractOut () | |
| virtual int | isActive () |
| virtual bool | isAllowed (itemCmd cmd) |
| virtual itemCmd | getDefaultOnVal () |
| virtual int | Status () override |
| virtual void | setStatus (uint8_t status) override |
| Item * | getItem () |
| Public Member Functions inherited from abstractCh | |
| abstractCh () | |
| virtual | ~abstractCh () |
| virtual int | Poll (short cause) |
Public Attributes | |
| int | numLeds |
| Number of LEDs on the strip. | |
| int8_t | pin |
| Data pin of the strip. | |
| int | ledsType |
| LED data order / speed flags. | |
Protected Member Functions | |
| void | getConfig () |
| Read data pin, LED count and LED type from the item arguments. | |
| Protected Member Functions inherited from abstractOut | |
| int | pubAction (bool state) |
| Protected Member Functions inherited from abstractCh | |
| int | publishTopic (const char *topic, long value, const char *subtopic=NULL) |
| int | publishTopic (const char *topic, float value, const char *subtopic=NULL) |
| int | publishTopic (const char *topic, const char *value, const char *subtopic=NULL, const char *suffix=NULL) |
Additional Inherited Members | |
| Protected Attributes inherited from colorChannel | |
| short | iaddr |
| short | numArgs |
| Protected Attributes inherited from abstractOut | |
| Item * | item |
| Item currently linked to this driver. | |
Addressable LED strip driver, SPI-like data protocol (CH_SPILED = 11).
Drives a NeoPixel-compatible LED strip (FastLED or Adafruit_NeoPixel backend) from a single data pin.
JSON config (item argument array):
The channel type is derived from ledsType: RGBW if the strip has a white channel, RGB otherwise. A subItem "from-to" (or a single LED number) limits the command to an LED range, otherwise the whole strip is affected.
|
overridevirtual |
Channel type derived from the LED strip type (RGB or RGBW).
Reimplemented from abstractOut.
|
protected |
Read data pin, LED count and LED type from the item arguments.
|
inlinevirtual |
Attach to an item and read the strip configuration.
Reimplemented from colorChannel.
|
overridevirtual |
Set the LED range (or the whole strip) to ON/OFF or an RGB color and show the result.
Implements colorChannel.
|
overridevirtual |
Allocate and initialize the LED strip (FastLED / Adafruit_NeoPixel).
Reimplemented from abstractOut.
|
overridevirtual |
Turn off the strip and free the LED buffer.
Reimplemented from abstractCh.
| int out_SPILed::ledsType |
LED data order / speed flags.
| int out_SPILed::numLeds |
Number of LEDs on the strip.
| int8_t out_SPILed::pin |
Data pin of the strip.