I’m working on a collaborative art project with @Twisted based around the orion constellation. She’s been responsible for the arty side of the project, and I’m covering the technical aspects of it. This is what we’ve got so far:
You’ll notice there are a number of holes on the board, these were laser cut by a company called razorlab, and are currently waiting for me to light them up using LEDs.
Now, because I enjoy biting off more than I can chew, I’ve decided I want to use neopixels (
WS2812 RBG LEDs - these are in fact the same as the ones in my UnicornHAT) controlled with an Arduino, to give them a twinkling effect. And I have no idea quite how to achieve this.
My first issue is, what is a twinkle? What are the properties of twinkles, and how can they be replicated using LEDs? I’m thinking that it’s possibly as simple as a having random LEDs light up and fade out - what do you think?
While I’ve been composing this post, I’ve been toying around with the WS2812 library (which has a super simple API, thankfully) and have put this together:
It’s a bit of a mess (I miss Ruby right now), but the basic idea is that it’ll choose a random pixel, which it will quickly fade up to full brightness of 255 (from the default brightness of 55), then slowly fade back out again, before pausing for 200 milliseconds and starting again.
I don’t think this is too bad of an effect, and works OK for the 5 I currently have connected, but if I’m going to be powering 20 of them, I think the effect will be a bit rubbish.
Instead, what I’m interested in doing is having different LEDs fade in and out in an asynchronous fashion - but my brain can’t quite figure out how to achieve that. So, any and all help that can be provided will be appreciated.
Addendum, for an idea of the type of effect I’m after, take a look at this (the effect starts around the 53 second mark):