diff --git a/NeoPatterns.cpp b/NeoPatterns.cpp index b7698fe..1047038 100644 --- a/NeoPatterns.cpp +++ b/NeoPatterns.cpp @@ -144,6 +144,7 @@ void NeoPatterns::TheaterChase(uint32_t color1, uint32_t color2, uint8_t interva Index = 0; Direction = dir; } + void NeoPatterns::TheaterChaseUpdate() { for (int i = 0; i < numPixels(); i++) { @@ -504,6 +505,13 @@ void NeoPatterns::ColorSet(uint32_t color) show(); } +void NeoPatterns::colorBox(uint8_t boxid, uint32_t c){ //color a box + for (int i=boxid*3;i<(boxid+1)*3;i++) { + setPixelColor(i, c); + } +} + + void NeoPatterns::ColorSetParameters(String parameters) { None(); diff --git a/NeoPatterns.h b/NeoPatterns.h index e2d6069..648a055 100644 --- a/NeoPatterns.h +++ b/NeoPatterns.h @@ -39,6 +39,7 @@ class NeoPatterns : public Adafruit_NeoPixel void SetColor2(uint32_t color); //Utilities void ColorSet(uint32_t color); + void colorBox(uint8_t boxid, uint32_t c); void ColorSetParameters(String parameters); uint8_t Red(uint32_t color); uint8_t Green(uint32_t color); diff --git a/esp-videoswitcher.ino b/esp-videoswitcher.ino index 599fa59..3ab0c82 100644 --- a/esp-videoswitcher.ino +++ b/esp-videoswitcher.ino @@ -5,7 +5,8 @@ #include "NeoPatterns.h" #define PIN D6 -#define NUMPIXELS 81 +#define BIGPIXELS 20 +#define NUMPIXELS * 3 // 3 LEDs form one pixel NeoPatterns strip = NeoPatterns(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ400, &StripComplete); // NeoPatterns strip = NeoPatterns(NUMPIXELS, PIN, NEO_RGB + NEO_KHZ400, &StripComplete);