Advertisement
BurningWreck

Glitter effect as one function

Oct 25th, 2021 (edited)
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. This line in Time_Performance:
  2.  
  3. FROM(0,0,6.500) {FastLED.setBrightness(BRIGHTNESS); Glitter(); FastLED.delay(1 / FRAMES_PER_SECOND);}
  4.  
  5. Calls this function I added to Halloween_chase:
  6.  
  7. void Glitter (){
  8. fadeToBlackBy( ledarray[0], 60, 10);
  9. fract8 chanceOfGlitter = 80;
  10.  
  11. if( random8() < chanceOfGlitter) {
  12. leds[ random16(60) ] += CRGB::Gold;} // Glitter colour fixed
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement