Okay, I promised I’d show my “glitchy” Christmas Lights (for a Stranger Things themed

Okay, I promised I’d show my “glitchy” Christmas Lights (for a Stranger Things themed Halloween party). As I mentioned before, I didn’t have time to do this like I really wanted, so I plan to redo it eventually. The effect is supposed to look like lights that are getting power surges and brownouts. So I’m basically just semi-randomly fiddling the global brightness, and sometimes adding in a “glitter” effect. “Semi” random, because I’m adding two random numbers to get a Gaussian distribution, allowing some cases to occur more often than others. I’ll post a link to a gist of the relevant code in the comments, later.

The underlying pattern is just alternating red and green lights that swap places every two seconds.

But the “glitch” effect is written to be layered on top of any pattern, as it just modifies the led[] array in-place. In fact, I actually had several patterns programmed, switching every two minutes, and I added glitching to some and not others, just for variety.

Running on an Adafruit Pro Trinket, if anyone is wondering.

Works nicely. Just enough glitchy that an observer will go “Wait, what’s going on?” :slight_smile:

My next idea is to try combining several sin8() values (with differing angle coefficients and offsets) to give me a bumpy curve, and use that for brightness thresholds. More on that after I give it a whirl.