Guest User

Untitled

a guest
Feb 22nd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. /*
  2. * Hello World
  3. * Simply prints Hello World to the serial monitor.
  4. */
  5. #include <FastLED.h>
  6. #define NUM_LEDS 50
  7. #define DATA_PIN 6
  8. CRGB leds[NUM_LEDS];
  9. int ledCounter;
  10. void setup() {
  11. // initialize serial communications at 9600 bps
  12. FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
  13. Serial.begin(9600);
  14. ledCounter=0;
  15. }
  16.  
  17. void loop() {
  18. Serial.println("Hello World.");
  19. //leds[ledCounter] = CRGB::Black;
  20. ledCounter++;
  21.  
  22. if (ledCounter>=NUM_LEDS)ledCounter=0;
  23. leds[ledCounter] = CRGB::SkyBlue;
  24. FastLED.show();
  25. delay(30);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment