#include <FastLED.h>
#define LED_PIN 3
#define COLOR_ORDER GRB
#define CHIPSET WS2811
#define BRIGHTNESS 254
#define FRAMES_PER_SECOND 30
#define NUM_LEDS 20
CRGB leds[NUM_LEDS];
void loop()
{
fill_solid(leds, NUM_LEDS, CRGB:: Gold);
for(int i = 0; i < NUM_LEDS; i++) {
Serial.println(NUM_LEDS - i);
fill_solid(leds, i , CRGB:: Red); // Counts 0 through 20 // fill_solid(position, # to fill, color);
FastLED.show();
FastLED.delay(150);
}
}
void setup() {
Serial.begin(115200);
FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalSMD5050);
FastLED.setBrightness( BRIGHTNESS );
fill_solid(leds, NUM_LEDS, CRGB:: Black);
FastLED.show();
}