Adds clock pin support for 4-wire strips

This commit is contained in:
David Madison 2018-10-18 17:42:33 -04:00
parent 0ffd98768e
commit e7175f82e2
1 changed files with 7 additions and 1 deletions

View File

@ -31,6 +31,7 @@ static const uint8_t
#define LED_TYPE WS2812B // led strip type for FastLED
#define COLOR_ORDER GRB // color order for bitbang
#define PIN_DATA 6 // led data output pin
//#define PIN_CLOCK 7 // led data clock pin (uncomment if you're using a 4-wire LED type)
// --- Serial Settings
static const unsigned long
@ -122,7 +123,12 @@ void setup(){
pinMode(DEBUG_FPS, OUTPUT);
#endif
#ifdef PIN_CLOCK
FastLED.addLeds<LED_TYPE, PIN_DATA, PIN_CLOCK, COLOR_ORDER>(leds, Num_Leds);
#else
FastLED.addLeds<LED_TYPE, PIN_DATA, COLOR_ORDER>(leds, Num_Leds);
#endif
FastLED.setBrightness(Brightness);
#ifdef CLEAR_ON_START