WS2812 type, pin, nbr, value%[()]
This command will drive one or more WS2812 LED chips connected to pin.
Note that the pin must be set to a digital output before this command is used. type is a single character specifying the type of chip being driven:
- O = original WS2812
- B = WS2812B
- S = SK6812
- W = SK6812W (RGBW)
nbr is the number of LEDs in the chain (1 to 256). The value%() array should be an integer array sized to have exactly the same number of elements as the number of LEDs to be driven.
For the first three variants each element in the array should contain the colour in the normal RGB888 format (i.e. 0 to &HFFFFFF).
For type W use a RGBW value (i.e. 0 to &HFFFFFFFF).
If only one LED is connected then a single integer should be used for value% (ie, not an array).