WS2812
Library for the WS2812 RGB LED with integrated controller. More...
Public Functions
Detailed Description
The WS2812 is controller that is built into a range of LEDs
Public Functions Documentation
function WS2812
WS2812::WS2812 (
PinName d,
int size
)
Creates an instance of the class.
Connect WS2812 address addr using SPI MOSI pins WS2812 constructor.
Parameters:
d SPI MOSI pin (data pin of WS2812)
size number of RGB LEDs on stripe
function ~WS2812
WS2812::~WS2812 ()
function write
void WS2812::write (
int buf
)
Writes data to bus asynchronously.
Parameters:
buf pointer to buffer to write
function write_offsets
void WS2812::write_offsets (
int buf,
int r_offset = 0,
int g_offset = 0,
int b_offset = 0
)
function setAll
void WS2812::setAll (
int colour
)
Set all LEDs to the same color
Parameters:
colour color to set
function useII
void WS2812::useII (
int d
)
function setII
void WS2812::setII (
unsigned char II
)
The documentation for this class was generated from the following file: D:/w/hw-libs/\_libs\_/libraries/WS2812.h
Last updated