Refactor data pin as define

Allows putting the clock pin definition next to it
This commit is contained in:
David Madison 2018-10-18 17:38:53 -04:00
parent 5e16a0a6c4
commit 0ffd98768e
1 changed files with 2 additions and 2 deletions

View File

@ -25,12 +25,12 @@
static const uint16_t static const uint16_t
Num_Leds = 80; // strip length Num_Leds = 80; // strip length
static const uint8_t static const uint8_t
Led_Pin = 6, // Arduino data output pin
Brightness = 255; // maximum brightness Brightness = 255; // maximum brightness
// --- FastLED Setings // --- FastLED Setings
#define LED_TYPE WS2812B // led strip type for FastLED #define LED_TYPE WS2812B // led strip type for FastLED
#define COLOR_ORDER GRB // color order for bitbang #define COLOR_ORDER GRB // color order for bitbang
#define PIN_DATA 6 // led data output pin
// --- Serial Settings // --- Serial Settings
static const unsigned long static const unsigned long
@ -122,7 +122,7 @@ void setup(){
pinMode(DEBUG_FPS, OUTPUT); pinMode(DEBUG_FPS, OUTPUT);
#endif #endif
FastLED.addLeds<LED_TYPE, Led_Pin, COLOR_ORDER>(leds, Num_Leds); FastLED.addLeds<LED_TYPE, PIN_DATA, COLOR_ORDER>(leds, Num_Leds);
FastLED.setBrightness(Brightness); FastLED.setBrightness(Brightness);
#ifdef CLEAR_ON_START #ifdef CLEAR_ON_START