Sunday, December 17, 2006

Firmware Updating Adventures

However lovely the Mindstorms NXT is, there is one truly annoying detail about firmware updates. They're erratic. The NXT software is also naggingly slow on some hardware.

I tried to upgrade the firmware to 1.04 today, using my Powerbook. It didn't work at all. The NXT would just quietly click along all the time. Nothing helped, not even booting the notebook, removing and re-inserting the NXT batteries, performing hard resets... nothing.

Guess what. When I took the NXT to the office with me (yup, sometimes I'm working on Sundays) and performed the firmware upgrade from a Windows box, it worked first time I tried. While I'm relieved that the NXT now runs the most recent firmware, I'm still a little upset that upgrading it from a Mac seems to be impossible (at least in my case).

Next, I had run the NXT software on a Windows box for the first time today, and I must say, I was pleased with its performance. Compiling and downloading an NXT program to the brick was done in just some very few seconds, whereas compiling and downloading the same program from a Mac takes significantly longer (definitely more than 10 seconds in case of a simple "play a sound" demo program).

I wonder what implementation approach was chosen to get the software running on the Mac. Do they run it in an emulator? ;-) Honestly, why does the compiler have to be so slow, even for trivial programs? I simply cannot understand this.

Well, these are two things for Lego to think about. They sure don't make me like the NXT any less. ;-)

N(e)xt Mindstorms Steps...

I finally found some time to play with that gorgeous Mindstorms NXT set of mine. O what fun! I basically built all the neat little robots from the manual that are extended step by step to feature a touch sensor, grasper, microphone, light sensor, and ultrasonic sensor.

While this looks as if I didn't do anything noticeable, I still fiddled around with some of the parameters to make the robot behave "well". For example, in the standard program suggested in the manual, the robot would simply run over the ball when hitting it, shoving it about the place a bit before stopping to move. This could be solved by letting the robot move slower. Other problems addressed were the speed of opening and closing the grasper (the ball would sometimes just jump away instead of being grabbed because of a too quick grip).

The image above shows the final robot. In this configuration (and with the program installed), it waits until a ball is placed in front of it, which is sensed via the ultrasonic sensor. The robot then moves until it hits the ball, waits for a loud sound (hand clap, for example), grabs the ball, turns around and moves back to the starting position. It finds this position by moving until the light sensor "sees" the black starting line.

Thanks, Lego! This is fun!

Monday, December 11, 2006

Mindstorms NXT Firmware Released

Hooray, Lego has finally released the NXT firmware today, as also several blogs report.

The license looks LGPLish to me, but I am not an expert. In any case, it states that all modified versions of the firmware must be published under the same license, and that it is possible to use the (modified) firmware in new software products, provided that the (modified) firmware itself is still covered by the license.

Apparently, the firmware is meant to be built using IAR tools, more precisely, the IAR Embedded Workbench, which is freely available only as a 30-day trial version or as a "kickstart" edition, which is limited in code size. I don't know whether the limited size is enough for building the NXT firmware. Would be nice, though. ;-)

Some patches are available that allow for compiling the firmware using the GCC tool chain.