Guest User

Untitled

a guest
May 11th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include "FastLED.h"  
  2.  
  3. #define NUM_LEDS 30  
  4. #define DATA_PIN 6  
  5.  
  6. CRGB leds[NUM_LEDS];  
  7.  
  8. void setup() {  
  9.        FastLED.addLeds<ws2811, data_pin,="" rgb="">(leds, NUM_LEDS);  
  10.       for (int i = 0; i < NUM_LEDS; i++) {  
  11.         leds[i] = CRGB::Black;  
  12.       }  
  13.       FastLED.show();  
  14. }  
  15.  
  16. void loop() {  
  17.   for (int i = 0; i < NUM_LEDS; i++) {  
  18.     leds[i] = CRGB::Red;  
  19.     FastLED.show();  
  20.     delay(1000);  
  21.   }  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment