Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void loop() //main loop
- {
- static uint8_t startIndex = 128;
- // startIndex = startIndex + 1;
- FillLEDsFromPaletteColors(startIndex);
- FastLED.show();
- FastLED.delay(1000 / UPDATES_PER_SECOND);
- }
- void FillLEDsFromPaletteColors(uint8_t colorIndex)
- {
- uint8_t brightness = 255;
- for( int i = 0; i < NUM_LEDS; i++) {
- leds[i] = ColorFromPalette( palette_name, colorIndex , brightness);
- colorIndex += NUM_LEDS / 255;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment