#include <Adafruit_NeoPixel.h>
#define LED_PIN_1 2
#define LED_PIN_2 3
#define LED_PIN_3 4
#define LED_PIN_4 5
#define LED_PIN_5 6
#define LED_PIN_6 7
#define LED_PIN_7 8
#define NUM_LEDS_PER_STRIP 60
#define NUM_STRIPS_1_TO_6 6
#define NUM_STRIPS_7 3
#define NUM_LEDS_STRIP_7 60
#define NUM_LEDS_TOTAL (NUM_LEDS_PER_STRIP * NUM_STRIPS_1_TO_6 + NUM_LEDS_STRIP_7)
Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(NUM_LEDS_PER_STRIP, LED_PIN_1, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(NUM_LEDS_PER_STRIP, LED_PIN_2, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip3 = Adafruit_NeoPixel(NUM_LEDS_PER_STRIP, LED_PIN_3, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip4 = Adafruit_NeoPixel(NUM_LEDS_PER_STRIP, LED_PIN_4, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip5 = Adafruit_NeoPixel(NUM_LEDS_PER_STRIP, LED_PIN_5, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip6 = Adafruit_NeoPixel(NUM_LEDS_PER_STRIP, LED_PIN_6, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip7 = Adafruit_NeoPixel(NUM_LEDS_STRIP_7, LED_PIN_7, NEO_GRB + NEO_KHZ800);
void setup() {
strip1.begin();
strip2.begin();
strip3.begin();
strip4.begin();
strip5.begin();
strip6.begin();
strip7.begin();
}
void loop() {
// Rainbow colors
uint32_t red = strip1.Color(255, 0, 0);
uint32_t orange = strip2.Color(255, 127, 0);
uint32_t yellow = strip3.Color(255, 255, 0);
uint32_t green = strip4.Color(0, 255, 0);
uint32_t blue = strip5.Color(0, 0, 255);
uint32_t indigo = strip6.Color(75, 0, 200);
uint32_t violet = strip7.Color(148, 0, 211);
// Set the colors for each strip
for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
strip1.setPixelColor(i, red);
strip2.setPixelColor(i, orange);
strip3.setPixelColor(i, yellow);
strip4.setPixelColor(i, green);
strip5.setPixelColor(i, blue);
strip6.setPixelColor(i, indigo);
}
for(int i = 0; i < NUM_LEDS_STRIP_7; i++) {
strip7.setPixelColor(i, violet);
}
// Show the colors
strip1.show();
strip2.show();
strip3.show();
strip4.show();
strip5.show();
strip6.show();
strip7.show();
delay(500);
}