#include <FastLED.h>
const int NUM_LEDS = 30;
const int DATA_PIN = 6;
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
FastLED.setMaxPowerInVoltsAndMilliamps(5,400);
FastLED.setBrightness(8);
}
void loop() {
for (int light=0; light<30; light++){
leds[light] = CRGB::Red;
FastLED.show();
delay(100);
if (leds[light] = CRGB::Red){
delay(100);
leds[light] = CRGB::Black;
}}
for (int light=0; light<30; light++){
leds[light] = CRGB::Black;
}
FastLED.show();
delay(100);
}