#include <FastLED.h>
#define LED_PIN 7
#define NUM_LEDS 6
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
for (int i = 0; i < NUM_LEDS; i++) {
for (int j = 0; j < 255; j++) {
leds[i] = CRGB(j, 0, 0);
FastLED.show();
delay(1);
}
}
for (int i = 0; i < NUM_LEDS; i++) {
for (int j = 0; j < 255; j++) {
leds[i] = CRGB(0, j, 0);
FastLED.show();
delay(1);
}
}
}