public class WS281xSpi extends Object implements LedDriverInterface
| Modifier and Type | Class and Description |
|---|---|
static class |
WS281xSpi.Protocol |
| Constructor and Description |
|---|
WS281xSpi(int controller,
int chipSelect,
StripType stripType,
int numLeds,
int brightness) |
WS281xSpi(int controller,
int chipSelect,
WS281xSpi.Protocol protocol,
StripType stripType,
int numLeds,
int brightness) |
| Modifier and Type | Method and Description |
|---|---|
void |
allOff()
Turn off all pixels and render.
|
void |
close() |
int |
getNumPixels() |
int |
getPixelColour(int pixel)
Get the current colour for the specified pixel.
|
void |
render()
Pixels are sent as follows:
- The first transmitted pixel is the pixel closest to the transmitter.
|
void |
setPixelColour(int pixel,
int colour)
Set the colour for the specified pixel.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBlueComponent, getGreenComponent, getRedComponent, setBlueComponent, setGreenComponent, setPixelColourHSB, setPixelColourHSL, setPixelColourRGB, setRedComponentpublic WS281xSpi(int controller,
int chipSelect,
StripType stripType,
int numLeds,
int brightness)
public WS281xSpi(int controller,
int chipSelect,
WS281xSpi.Protocol protocol,
StripType stripType,
int numLeds,
int brightness)
public void close()
close in interface LedDriverInterfaceclose in interface Closeableclose in interface AutoCloseablepublic int getNumPixels()
getNumPixels in interface LedDriverInterfacepublic int getPixelColour(int pixel)
LedDriverInterfacegetPixelColour in interface LedDriverInterfacepixel - Pixel number.public void setPixelColour(int pixel,
int colour)
LedDriverInterfacesetPixelColour in interface LedDriverInterfacepixel - Pixel number.colour - Colour represented as a 24bit RGB integer (0x0RGB).public void render()
render in interface LedDriverInterfacepublic void allOff()
LedDriverInterfaceallOff in interface LedDriverInterfaceCopyright © 2016–2018 mattjlewis. All rights reserved.