shdowmyst

Untitled

Aug 5th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. void loop() //main loop
  2. {
  3.  static uint8_t startIndex = 128;      
  4. // startIndex = startIndex + 1;        
  5.  FillLEDsFromPaletteColors(startIndex);
  6.  FastLED.show();                       
  7.  FastLED.delay(1000 / UPDATES_PER_SECOND); 
  8. }
  9.  
  10. void FillLEDsFromPaletteColors(uint8_t colorIndex)
  11. {
  12.   uint8_t brightness = 255;                        
  13.  
  14.   for( int i = 0; i < NUM_LEDS; i++) {             
  15.     leds[i] = ColorFromPalette( palette_name, colorIndex , brightness);
  16.     colorIndex += NUM_LEDS / 255;                              
  17.   }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment