#include <FastLED.h>
#define NUM_LEDS 16
#define LED_PIN 6
#define BRIGHTNESS 255
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(255); // 0-255
}
void loop() { // breathing effect
for(int i=0;i<NUM_LEDS;i++){
leds[i]=CRGB::LightGreen;
}
for(int i=0; i<BRIGHTNESS;i++){
FastLED.setBrightness(random(65,188));
FastLED.show();
delay(277);
}
delay(200);
for(int i=BRIGHTNESS;i>0;i--){
FastLED.setBrightness(i);
FastLED.show();
delay(10);
}
FastLED.show();
// while (1);
}