From 4cf7d401e3b0c4d596439fc690c3d1820ee0e3e0 Mon Sep 17 00:00:00 2001 From: David Madison Date: Wed, 21 Dec 2016 11:29:46 -0500 Subject: [PATCH] Generalized FastLED strip parameters --- Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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