#include <FastLED.h>
#define NUM_LEDS (6 * 22)
// Allocate space for all LEDs
CRGBArray<NUM_LEDS> leds;
// Create an array of groups of LEDs
CRGBSet const fixtures[] = {
leds(0, 21),
leds(22, 43),
leds(44, 65),
leds(66, 87),
leds(88, 109),
leds(110, 131),
};
CRGB const colors[] = {
CRGB::Black, CRGB::Brown, CRGB::Red,
CRGB::Orange, CRGB::Yellow, CRGB::Green,
CRGB::Blue, CRGB::Purple, CRGB::Grey, CRGB::White,
};
size_t const sz_colors = sizeof(colors) / sizeof(*colors);
void setup() {
FastLED.addLeds<WS2812B, 2, GRB>(leds, NUM_LEDS);
}
void loop() {
static uint16_t offset = 0;
uint16_t color = offset++;
for (auto &f:fixtures) {
f.fill_solid(colors[color++ % sz_colors]);
}
FastLED.show();
delay(100);
}