Datasheet

Note that there’s nearly 25% “wiggle room” in the timing. So if your code can’t match the recommended times exactly,
it’s usually okay, as long as it’s close.
There are three bytes of data for each pixel. These should be issued in green, red, blue order, with the most-significant
bit first.
The data for pixel #0 (nearest the microcontroller) is issued first, then pixel #1, and so forth to the furthest pixel. This
does not operate like a traditional shift register!
After all the color data is sent, the data line must be held low for a minimum of 50 microseconds for the new colors to
“latch.”
You may want to dig through our Arduino library for insights. The timing-critial parts are written in AVR assembly
language, but it’s extensively commented with C-like pseudocode.
My Microcontroller Isn’t Fast Enough to Do That
The WS2812 appears to be backwardly-compatible with the 400 KHz WS2811 signal. If you can precisely match the
latter chip’s timing, either type will respond. The WS2811 protocol is not simply a half-speed WS2812. The duty
cycle for the “0” and “1” bits is slightly different. From the WS2811 datasheet:
© Adafruit Industries https://learn.adafruit.com/adafruit-neopixel-uberguide Page 59 of 68