Guest User

Untitled

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