diff --git a/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino b/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino index 099b7e1..f497dd5 100644 --- a/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino +++ b/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino @@ -1,8 +1,6 @@ // Slightly modified Adalight protocol implementation that uses FastLED // library (http://fastled.io) for driving WS2811/WS2812 led strip -#include - // -------------------------------------------------------------------- // -- General Settings @@ -10,6 +8,10 @@ #define LED_PIN 6 // Arduino data output pin #define BRIGHTNESS 255 // maximum brightness +// --- FastLED Setings +#define LED_TYPE WS2812B // led strip type for FastLED +#define COLOR_ORDER GRB // color order for bitbang + // --- Serial Settings #define SPEED 115200 // serial port speed, max available static const unsigned long // time before LEDs are shut off, if no data @@ -21,6 +23,8 @@ static const unsigned long // time before LEDs are shut off, if no data // -------------------------------------------------------------------- +#include + CRGB leds[NUM_LEDS]; uint8_t * ledsRaw = (uint8_t *)leds; @@ -53,7 +57,7 @@ void setup() digitalWrite(GROUND_PIN, LOW); #endif - FastLED.addLeds(leds, NUM_LEDS); + FastLED.addLeds(leds, NUM_LEDS); // Dirty trick: the circular buffer for serial data is 256 bytes, // and the "in" and "out" indices are unsigned 8-bit types -- this