Advertisement
Guest User

Moving dot - FastLED

a guest
Dec 22nd, 2015
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. void loop()
  2. {
  3.     // Move a single dot along a strip
  4.    
  5.     for(int led_number = 0; led_number < NUM_LEDS; led_number++)
  6.     {
  7.         // Turn our current led ON, then show the leds
  8.         leds[led_number] = CRGB::Red;
  9.  
  10.         // Show the leds (only one of which is has a color set, from above
  11.         // Show turns actually turns on the LEDs
  12.         FastLED.show();
  13.  
  14.         // Wait a little bit - this will dictate speed
  15.         delay(30);
  16.  
  17.         // Now set our current led back to black,
  18.         // but we wont show that until the next loop around.
  19.         leds[led_number] = CRGB::Black;
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement