In a reply to a preview post, Jim pointed out this video of a cool project another guy did using G35 strings and a microcontroller: http://www.youtube.com/watch?v=bPgqNXjf-MY
I’ve been kind of dreading the effort of setting pulling out the scores of strings of lights I normally set up and sequence with my custom relay box. I did a Halloween setup and just finished taking it down. What with having to go out to the piney woods of East Texas for the Thanksgiving holiday and subsequent AustinLightGuy appearances around town in Austin, I just don’t have the energy this year! I was already thinking about doing something that was “big bang, low-effort”, so that post got me thinking.
Now, that MegaTree looks like it would involve a whole lot of micro-controller code, which is pretty time consuming to write, debug, etc. In fact, writing custom code for all those patterns seems likely to be time-consuming in any language, so I started thinking about whether I could leverage my existing home-grown sequencer. In one respect, it’s not a great fit: it’s basically designed to turn individual “channels” (aka, light strings) on and off, not render what is essentially raster graphics on a grid of bubs. I though about a way to do that easier and maybe still leverage my sequencer in some way.
I came up with something pretty easy..I’m kind of going to “cheat”. When you think about it, most of those patterns can be achieved by essentially rendering very-lo-res bitmaps to a display grid composed of bulbs. So, if I write some software that just takes bitmaps, “renders” them as commands to individual bulbs, and provides for scrolling the bitmaps in and out, rotating them up, down, left, right, etc., that – when combined with some simple bitmaps I can whip up in a paint program – would come come pretty close. So that’s what I did.
My sequencer already accommodates dropping a variety of controls onto a sequence channel; on/off spans (which can also be G35 ramp up/down commands for channels mapped to G35 strings), pauses, loops, wave players and X10/Insteon controls. I made a new one with a property sheet that looks like this:
I can specify the bitmap to display, cause it to scroll in or just appear, rotate up/down/left/right any number of times, then scroll out or just disappear. I can drop multiple grid controls back-to-back on a channel and, since I can carefully control the start times, I should be able to keep them pretty well synced with music from a WavePlayer control. Like my single-string G35 driver, this is a tethered solution – EverSequence is written in C# and it talks to an Arduin-compatible microcontroller over a USB serial port. The microcontroller runs a simple program that basically just acts as a protocol converter.
Now having spent a couple of man-days on it, I think it’s working pretty great. I have the same problem I have driving one G35 string with an Arduino…the sketch seems to wind up having timing glitches when it’s reading lots of data from serial and toggling the digital-out pin. This results in “glitchiness”, with bulbs left on..state changes cropped..etc. But, as with the single-string driver, the screamin-fast chipKit Uno32 from Digilent seems to be totally up to the task. I can drive it at 230,400 baud and it seems to miss nary a command. I think at that rate, it’ll be capable of really decent “frame rates”, even with a 12X24 grid (yeah, my tree will be smaller than that other guy’s – only 24 lengths of 12 lights..or 6 strings). Stay tuned for a follow-up describing the build and final product and a link to the Sequencer.