WS2812B Fastled Theater chase

Hi lesept,

Thank you very much for your time and reply.I will try this and let you know what happens.I tried the first sketch you gave to me which works but it only sends 4 leds then another 4 I second later.Once the first 8 reach the end of the strip it repeats.I tried to add more using index3 and so on but it only shows two sets of four.By the way your English is very good :slight_smile:

#include <FastLED.h>

// Define the array of leds
#define LED_DT 6
#define COLOR_ORDER GRB
#define LED_TYPE WS2812
#define NUM_LEDS 150
uint8_t max_bright = 255;
struct CRGB leds[NUM_LEDS];

int index1;
int index2;
int index3;
unsigned long initialtime;

void set4leds(int pos) {
leds[pos].setRGB (0, 0, 0);
leds[pos + 1].setRGB (255,255, 0);
leds[pos + 2].setRGB (255,255, 0);
leds[pos + 3].setRGB (255,255, 0);
}

void setup() {
delay (1000);
LEDS.addLeds<LED_TYPE, LED_DT, COLOR_ORDER>(leds, NUM_LEDS);
FastLED.setBrightness(max_bright);
index1 = 0;
index2 = 0;
index3 = 0;
initialtime = millis();
}

void loop() {
FastLED.clear();
set4leds(index1);
index1 = (index1 + 1) % (NUM_LEDS - 4);
if (millis() - initialtime > 1000) {
set4leds(index2);
index2 = (index2 + 1) % (NUM_LEDS - 4);
set4leds(index3);
index3 = (index3 + 1) % (NUM_LEDS - 4);
}
FastLED.show();
delay (50);
}