Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Patterns that can be added to FastLED's DemoReel100 example
- void confetti_GB()
- {
- // random colored speckles, Green and Blue hues only
- // Green = 96, Blue = 160
- uint8_t p = 25; // What percentage of the time to make speckles. [Range 0-100]
- fadeToBlackBy( leds, NUM_LEDS, 10);
- if (random8(100) < p) {
- int pos = random16(NUM_LEDS);
- uint8_t hue = random8(2); // randomly chooses a 0 or 1
- if (hue == 0) {
- hue = random8(92,111); // pick a hue somewhere in the green zone
- } else {
- hue = random8(156,165); // pick a hue somewhere in the blue zone
- }
- leds[pos] += CHSV( hue, random8(200,240), 255);
- }
- }//end confetti_GB
Add Comment
Please, Sign In to add comment