Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <FastLED.h>
- #define NUM_LEDS 8 //Comment Out when I want 16 (2 strips)
- //#define NUM_LEDS 16
- CRGB leds[NUM_LEDS];
- void setup() {
- delay(500); // power-up safety delay
- FastLED.addLeds<HD108,0,0,RGB>(leds,8); //First Strip of 8
- //FastLED.addLeds<HD108,0,0,RGB>(leds,8,8); // Uncomment when I want 16 (2 strips)
- FastLED.clear();
- FastLED.setBrightness(10);
- FastLED.show();
- }
- void loop() {
- for(int i=0;i<NUM_LEDS;i++) {
- leds[i]=CRGB::Green;
- FastLED.show();
- FastLED.delay(150);
- fadeToBlackBy(leds,NUM_LEDS,100);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment