Hacking the NXT With LEGO’s Blessing

Reading Time: 3 minutes

Image: LEGOImage: LEGO

Image: LEGO

Most people who play with the LEGO Mindstorm NXT, especially the younger ones, never find a reason to go beyond the stock programming environment. However, LEGO has a good policy for groups who wish to take the NXT a little farther. They openly support the hacker community with an open source version of the NXT firmware, provide detailed hardware information including schematics of the NXT ans sensors, and give specifications for interfacing third party and home built sensors. They even provide a complete Software Developer Kit (SDK).

My recent trip to NI Week in Austin has inspired me to do a little more with the NXT and explore its capabilities. My son is on board with this project, but I’m not sure how long he’ll hold out. We’ve exhausted the capabilities of the stock programming environment and we both want something that will take us beyond simple loops, compares, and controls. I don’t think he quite has the programming knowledge to go any farther by himself, but I think this will be a good opportunity for him to learn.

So the research begins. We are examining as many NXT programming environments as we can. Budget (near zero), time, system requirements, and ease of use will all be factors in our final decision. OS isn’t really important, but any usable solution that runs easily in Ubuntu will gain some serious extra credit. An IDE of some sort is nearly essential since I don’t think I’m completely ready to turn him lose on the command line and answer all the questions that will bring up.

Fortunately there are still a lot of options to choose from. Many open source, some free but closed source, and a few commercial options await our trials. I won’t go into detail about each, but I’ll summarize what I’ve found so far and save specifics for later posts.

I started from the somewhat incomplete LEGO Mindstorm NXT programming languages on Wikipedia. I do plan to update the wiki page as I go. I’ve already dismissed a few of these because they are too scientific (MATLAB) or use Java (leJOS NXJ), but I’m willing to give most of the rest a try as long as they aren’t too difficult to get running. I’m planning on giving LabView’s NXT Toolkit a chance, but I’ve had issues with the evaluation version and a single seat academic license is $109.

The least expensive commercial option is Robot C at $30. I have a little experience programming for VEX with Robot C, so it shouldn’t be too hard to make the switch. They also offer a 30 day trial which I plan to give a go once I think I have a mostly free weekend.

Just to satisfy my own curiosity and to reacquaint myself with C, I’m going to try out NXTGCC, a GCC tool chain for exploring the NXT’reme open source firmware, and SDK. I don’t plan to introduce my son to gcc quite yet, but it is an option once he gets a better handle on general programming concepts.

We also plan to explore some of the sensors and PS2 wireless controller from mindsensors.com and HiTechnic as out budget and time permit. There is even talk of saving some allowance money to go toward another NXT 2.0, but we may settle for buying the 1.0 brick off eBay. It’s about half the cost of the full kit.

I’ll refrain from setting any exact schedule , but I will follow this up with a roughly monthly post about what we have tried, what worked, and what failed. If you have any experience, opinions, or suggestions, please drop a comment below.

Related posts:
GeekDad attends NI Week 2009
Enter This Contest and Race to the Moon
Mindstorms Reloaded: LEGO Announces NXT 2.0

Get the Official GeekDad Books!