Ah yes — another Christmas, another Geek Tree! The Geek Tree, for those unfamiliar with it, is an annual tradition for me, one that arose when my wife pleaded for me to stop overloading the family tree with TIE Fighters, Enterprises, and Jedi. This year it will contain all the trimmings of previous years, but I’m looking to take it a step further by adding robotics to its towering, 7-foot frame.
Bracing for the Mindstorm
I got the LEGO MindStorms set — the one that lets you build functional LEGO robots — a few years ago, played with it for a few months and then retired it in favor of other pursuits (most likely Halo). I’ve though of getting it out again several times in the ensuing years, but was hung up on the fact that the LEGO software only ran under Windows and the only Mac port I could find — Robot Controller [Web Archive]– couldn’t see the LEGO infrared tower I needed to upload programs to my robot’s brain, the “RCX” LEGO brick.
The set languished until this weekend when I decided to see if any progress had been made in getting Mac OS X to talk with the RCX brick. A Google search turned up the excellent Macworld article “Killer Mac Robots”, which proved to be the key to getting the entire endeavor running again. It included a discussion of — and links to — MacNQC [Web Archive]. “Not Quite C” is the programming language that drives LEGO robots, and MacNCQ is a bit of software that lets you upload the firmware (the core set of instructions that tell the LEGO brain brick how to interpret NQC commands), write and install programs and run various diagnostics to make sure everything’s working properly. Heck, it even has a debugger so you test your program for errors before feeding it to your robot.
The immediate challenge now is figuring out exactly how to write the programs, specifically, how to figure out what the various variables and functions are. Fortunately there’s the NQC Tutorial [Web Archive] which appears to spell everything out for newbies like me.
Onward My Robotic Minions!
Once I’ve got a basic understanding of how to program the brick, the question becomes exactly how should the Geek Tree be Borged? My first thought was to go more space-themed than cybernetic, and build a “space elevator” running from the floor the ceiling next to the tree. I envision a ground station featuring a solid base containing the RCX controller and perhaps a guide tower for making sure the elevator line doesn’t get tangled and a “space station” hanging from the ceiling near the top of the tree.
A small LEGO capsule — controlled by the LEGO brain — would then be raised and lowered every few minutes. The capsule’s movement would either be controlled by timing (“run motor #1 for X minutes; wait Y minutes, then run in reverse for X minutes) or by jerryrigging one of the touch sensors to “feel” when the capsule ran out of rope (trickier since the touch sensors would need to be attached to the ground station).
It’s a fun idea, but I’m concerned about the strain it might place on the LEGO motors, particularly if the capsule got hung up on something (but then again I might be able to program it to stop lifting if that happens). It might prove irresistible to my daughter, which could cause the whole thing to come crashing down, and even if she didn’t take it out, there’s always our two dogs — a Labrador Retriever and a German Shepherd Dog — to consider.
After thinking about it some more, I’m leaning toward using the basic humanoid robot plans from the Mindstorms instruction book. This robot can sense motion, and take action when it does so. That, combined with perhaps playing a song when touched, would make for a much more interactive Geek Tree. If it’s placed high enough, then the dogs and kids won’t be able to get to it (but StarGirl can still play with if Sue or I are around).
Either way, the Geek Tree will be considerably, well, geekier than it has been in previous years. And that’s a good thing … at least for me.