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