|
Tiny-WS2812
1.0.0
A tiny cross-platform WS2812 LED Strip driver
|
C++ Wrapper implementation of blink_array.c
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 {8, 9} |
| Arduino pin(s) used to program the WS2812 device(s). Must share same port! (See https://www.arduino.cc/en/Reference/PortManipulation) | |
| #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 | |
| void | setup () |
| void | loop () |
Variables | |
| uint8_t | pins [] = DATA_PINS |
| Data pins. | |
| ws2812_rgb | leds [N_LEDS] |
| RGB array which represents the LEDs. | |
| ws2812_cpp * | ws2812_dev |
| Device object. | |
C++ Wrapper implementation of blink_array.c
This example showcases the blink array example on AVR platforms which support the Arduino Framework, using the C++ wrapper of the Tiny-WS2812 driver. The purpose of this example is to merely showcase the differences between the C++ wrapper and the C interface. For a more detailed description of the functionality, consult the blink array example written in the C interface.
-DWS2812_TARGET_PLATFORM_ARDUINO_AVR in the build flags, or by uncommenting the #define WS2812_TARGET_PLATFORM_ARDUINO_AVR directive at the top of this file. Definition in file blink_cpp.cpp.
| void loop | ( | ) |
| void setup | ( | ) |
Configures a WS2812 device struct.
Definition at line 57 of file blink_cpp.cpp.