Tiny-WS2812
1.0.0
A tiny cross-platform WS2812 LED Strip driver
|
Blinks one or more WS2812 devices using a RGB array. More...
Go to the source code of this file.
Macros | |
#define | N_LEDS 8 |
Number of LEDs on your WS2812 device(s) | |
#define | DATA_PINS_PORT PORTB |
Port register used to communicate with the WS2812 device(s) | |
#define | DATA_PINS_DDR DDRB |
Data direction register of the pin(s) used to communicate with the WS2812 device(s) | |
#define | DATA_PINS {PB0, PB1} |
Pin(s) used to communicate with the WS2812 device(s) | |
#define | RESET_TIME 50 |
Reset time in microseconds (50us recommended by datasheet) | |
#define | COLOR_ORDER grb |
Color order of your WS2812 LEDs (Typically grb or rgb) | |
Functions | |
int | main () |
Blinks one or more WS2812 devices using a RGB array.
The following example showcases how the Tiny-WS2812 library can be used on AVR platforms to blink an entire WS2812 device in white. In this rather memory expensive example, we achieve this by simply creating a rgb array equal to the number of LEDs on the WS2812 device, whose values we then transmit to the device using the ws2812_tx() function.
For a more memory efficient method, take a look at the blink_loop.c example.
Definition in file blink_array.c.
int main | ( | ) |
Blinks one or more WS2812 device(s)
Definition at line 59 of file blink_array.c.