Dave's Lego Mindstorms NXT stuff

I started playing with Lego Mindstorms during the Mindstorms Developer Program, a six month beta program preceding the official launch of Lego's new robotics kit. My interest was quite focused on the internals of the beast. The development environment and tools that Lego provided were very nice, but had a few flaws: they were aimed at abstracting away the problems of the embedded platform, and most problematic for me, it didn't work on Linux, my operating system of choice.

So I got to work on killing two birds with one stone: create portable, open source tools that enable very low level interaction with the Lego Mindstorms NXT intelligent brick, and try to enter the fairly specialized world of embedded software, by writing an embedded operating systemto replace Lego's firmware.

The first of those objectives led to the creation of LibNXT, a portable library for interacting with SAM-BA, the brick's low level bootloader, and associated tools for uploading and starting compiled firmware images on the brick.

The second objective stayed dormant for a longer time, and only really came into its own in February 2007, when I had the opportunity of signing up for a 'TX' course during my studies at the University of Technology of Belfort-Montbeliard. This course is special in that the students, usually in pairs, get to define an objective and key results, and, if approved, spend a semester working towards that objective. This essentially frees up one course's worth of time to work on something you care about.

So, during the spring of '07, I worked along with Jerome Flesch towards a rather simple objective: boot our own, open source embedded kernel on the Lego brick, and develop basic input (analog sensors) and output (motors) drivers. We managed to get a lot more than that done, adding support for sound, display, USB communication, and closed-loop feedback control of motor position. We also wanted to make this kernel readily understandable to novices in the embedded world, and as such the code is heavily commented, points to relevant hardware and software documentation where appropriate, and is generally very readable and accessible (at least we think so!).

We will be working on this project again during the Fall '07 semester, with more fun goals, such as implementing a scheduler, adding I2C sensor support, and bluetooth communication. This project is called NxOS. The non-code documentation is currently lacking, but we hope to improve that over the course of this semester as well.