#include <FastLED.
h>
#define LED_PIN 6
#define NUM_LEDS 100
#define BRIGHTNESS 64
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds,
NUM_LEDS).setCorrection(TypicalLEDStrip);
FastLED.setBrightness(BRIGHTNESS);
void loop() {
// Array of colors for the LED groups
CRGB colors[] = {CRGB::Red, CRGB::Green, CRGB::Blue, CRGB::Yellow, CRGB::Cyan};
int numColors = sizeof(colors) / sizeof(colors[0]);
static int startPosition = 0;
// Fill the strip with groups of 20 LEDs of different colors
for (int i = 0; i < NUM_LEDS; i += 20) {
int colorIndex = (i / 20) % numColors;
for (int j = 0; j < 20 && (i + j) < NUM_LEDS; j++) {
leds[i + j] = colors[colorIndex];
// Set 5 LEDs to off state and move them
for (int j = 0; j < 5; j++) {
int ledPos = (startPosition + j) % NUM_LEDS;
leds[ledPos] = CRGB::Black;
FastLED.show();
delay(100); // Adjust delay for speed control
// Move the start position for the next frame
startPosition = (startPosition + 1) % NUM_LEDS;