Datasheet

Writing Your Own Library
The WS2812 datasheet (https://adafru.it/cDB) explains the data transmission protocol. This is a
self-clocking
signal —
there’s only one wire, not separate data and clock lines. “1” and “0” bits are indicated by varying the duty cycle of a
fixed-frequency square wave.
There’s a math goof in the datasheet’s timing values. Use these figures instead:
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.
© Adafruit Industries https://learn.adafruit.com/adafruit-neopixel-uberguide Page 97 of 100