Ligne 50 : |
Ligne 50 : |
| The [http://www.adafruit.com/datasheets/WS2812.pdf WS2812 datasheet] 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. | | The [http://www.adafruit.com/datasheets/WS2812.pdf WS2812 datasheet] 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. |
| | | |
− | [[Fichier:NeoPixel-UserGuide-YourLib-01.jpg]] | + | [[Fichier:NeoPixel-UserGuide-YourLib-01.png]] |
| | | |
| There’s a math goof in the datasheet’s timing values. Use these figures instead: | | There’s a math goof in the datasheet’s timing values. Use these figures instead: |
| | | |
− | [[Fichier:NeoPixel-UserGuide-YourLib-02.jpg]] | + | [[Fichier:NeoPixel-UserGuide-YourLib-02.png]] |
| | | |
| 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. | | 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. |
Ligne 60 : |
Ligne 60 : |
| There are three bytes of data for each pixel. These should be issued in green, red, blue order, with the most-significant bit first. | | There are three bytes of data for each pixel. These should be issued in green, red, blue order, with the most-significant bit first. |
| | | |
− | [[Fichier:NeoPixel-UserGuide-YourLib-03.jpg]] | + | [[Fichier:NeoPixel-UserGuide-YourLib-03.png]] |
| | | |
| 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! | | 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! |