diff --git a/platformio.ini b/platformio.ini index 3e2d43b..eef0c6c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -19,6 +19,7 @@ build_flags = lib_deps = fastled/FastLED + [env:teensy31] platform = teensy board = teensy31 @@ -26,6 +27,7 @@ framework = arduino build_flags = -D USB_SERIAL_HID -D PIN_DATA=0 + -D LED_OFFSET=134 lib_deps = fastled/FastLED diff --git a/src/main.cpp b/src/main.cpp index a91bb5a..675ae15 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -34,9 +34,9 @@ // --- General Settings const uint16_t - Num_Leds = 264; // strip length + Num_Leds = 268; // strip length const uint8_t - Brightness = 127; // maximum brightness + Brightness = 255; // maximum brightness // --- FastLED Setings #if defined(SK6812RGBW) @@ -297,8 +297,12 @@ void dataMode(){ uint8_t w=calibW*whitecontent; + int inew = i; + #ifdef LED_OFFSET + inew = (i+LED_OFFSET)%Num_Leds; //if offset defined, move led 1 around and wrap around at the end + #endif - send_leds[i] = CRGBW(r, g, b, w); //transfer to rgbw struct + send_leds[inew] = CRGBW(r, g, b, w); //transfer to rgbw struct } #endif