Ws2812WriteNPixels()

Update an arbitrary number of consecutive WS2812 lights in a chain.

Syntax


Ws2812WriteNPixels(unsigned short startPixel, unsigned short numPixels, unsigned char* data, unsigned char refresh);

startPixel
The index of the first WS2812 to update.

numPixels
The number of consecutive pixels to update.

data
A pointer to an unsigned byte array containing the new RGB values of the WS2812s to update.

refresh
Refresh the light chain.

  • 0 - RGB values will be stored in memory but the light chain will not be updated to reflect the change.
  • 1 - RGB values will be stored in memory and the light chain will be updated to reflect the change immediatly.



Returns


int status