Skip to content

ws2812writeonepixel

Ken Sharp edited this page Dec 8, 2023 · 1 revision

Ws2812WriteOnePixel()

Update a single pixel in the WS2812 chain and optionally refresh the chain.

Syntax

Ws2812WriteOnePixel(unsigned short pixelIndex, unsigned char red, unsigned char green, unsigned char blue, unsigned char refresh);

pixelIndex
The index of the WS2812 to update. For example 0 will update the first LED in the chain.

red
The red value 0-255.

green
The green value 0-255.

blue
The blue value 0-255.

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

Related Links

Clone this wiki locally