#include <Adafruit_NeoPixel.h>
#define LED_PIN_1 6
#define LED_PIN_2 7 // Define pin for the second NeoPixel ring
#define LED_PIN_3 8 // Define pin for the third NeoPixel ring
#define NUM_LEDS_1 16 // Number of LEDs in the first ring
#define NUM_LEDS_2 60 // Number of LEDs in the second ring
#define NUM_LEDS_3 80 // Number of LEDs in the third ring
Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(NUM_LEDS_1, LED_PIN_1, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(NUM_LEDS_2, LED_PIN_2, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip3 = Adafruit_NeoPixel(NUM_LEDS_3, LED_PIN_3, NEO_GRB + NEO_KHZ800);
void setup() {
strip1.begin();
strip2.begin();
strip3.begin();
strip1.show();
strip2.show();
strip3.show();
}
void loop() {
// Example: Set each ring to a different color
colorWipe(strip1.Color(255, 0, 0), strip2.Color(0, 255, 0), strip3.Color(0, 0, 255), 50); // Change colors and delay as needed
}
// Fill the dots one after the other with a color
void colorWipe(uint32_t color1, uint32_t color2, uint32_t color3, int wait) {
for(int i=0; i<max(NUM_LEDS_1, max(NUM_LEDS_2, NUM_LEDS_3)); i++) {
if (i < NUM_LEDS_1) {
strip1.setPixelColor(i, color1);
}
if (i < NUM_LEDS_2) {
strip2.setPixelColor(i, color2);
}
if (i < NUM_LEDS_3) {
strip3.setPixelColor(i, color3);
}
}
strip1.show();
strip2.show();
strip3.show();
delay(wait);
}