#include #include #include #include #include #include #define PIXEL_COUNT 124 #define PIXEL_PIN 16 #define PIXEL_BRIGHTNESS 10 #define SCREEN_RESET_PIN 22 //#define SCREEN_RESET_PIN U8X8_PIN_NONE U8X8_SSD1306_72X40_ER_HW_I2C u8x8(SCREEN_RESET_PIN); Adafruit_NeoPixel strip(PIXEL_COUNT, PIXEL_PIN, NEO_GRB + NEO_KHZ800); int count = 0; void rainbow(int wait) { for(long firstPixelHue = 0; firstPixelHue < 5*65536; firstPixelHue += 256) { // apply rainbow to the first 64 pixels for(int i=0; i<=63; i++) { int pixelHue = firstPixelHue + (i * 65536L / strip.numPixels()); strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue))); } // Blank everything over pixel 64 //for(int j=65; j<=124; j++) strip.setPixelColor(j-1, strip.Color(0,0,0)); // 65->72 to mirror 4 for(int j=65; j<=72; j++) strip.setPixelColor(j-1, strip.getPixelColor(4-1)); // 73->79 to mirror 12 for(int j=73; j<=79; j++) strip.setPixelColor(j-1, strip.getPixelColor(12-1)); // 80->86 to mirror 20 for(int j=80; j<=86; j++) strip.setPixelColor(j-1, strip.getPixelColor(20-1)); // 87->94 to mirror 28 for(int j=87; j<=94; j++) strip.setPixelColor(j-1, strip.getPixelColor(28-1)); // 95->102 to mirror 36 for(int j=95; j<=102; j++) strip.setPixelColor(j-1, strip.getPixelColor(36-1)); // 103->109 to mirror 44 for(int j=103; j<=109; j++) strip.setPixelColor(j-1, strip.getPixelColor(44-1)); // 110->116 to mirror 52 for(int j=110; j<=116; j++) strip.setPixelColor(j-1, strip.getPixelColor(52-1)); // 117->124 to mirror 60 for(int j=117; j<=124; j++) strip.setPixelColor(j-1, strip.getPixelColor(60-1)); // Show and wait strip.show(); delay(wait); } } void all(uint8_t red, uint8_t green, uint8_t blue){ for(int i=0; i