From a20ca0e10841456ac8ab92bd05ba012e85e18ec3 Mon Sep 17 00:00:00 2001 From: David Madison Date: Wed, 21 Dec 2016 11:01:46 -0500 Subject: [PATCH] Made ground pin explicitly optional --- 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 24056f8..e461837 100644 --- a/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino +++ b/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino @@ -5,9 +5,10 @@ #define NUM_LEDS 80 // strip length #define LED_PIN 6 // Arduino data output pin -#define GROUND_PIN 10 // additional grounding pin (optional) #define BRIGHTNESS 255 // maximum brightness #define SPEED 115200 // serial port speed, max available + +//#define GROUND_PIN 10 // additional grounding pin (optional) //#define CALIBRATE // uncomment to set calibration mode // If no serial data is received for a while, the LEDs are shut off @@ -41,8 +42,11 @@ static const uint8_t magic[] = { void setup() { - pinMode(GROUND_PIN, OUTPUT); - digitalWrite(GROUND_PIN, LOW); + #ifdef GROUND_PIN + pinMode(GROUND_PIN, OUTPUT); + digitalWrite(GROUND_PIN, LOW); + #endif + FastLED.addLeds(leds, NUM_LEDS); // Dirty trick: the circular buffer for serial data is 256 bytes,