Sunday, November 4, 2007

Johnny-5's alive (and made of plastic)

I've managed to spend the evening playing with the new Lego Mindstorms NXT robotics kit (OK, Lauren thinks that she was helping too). I thought that there might be an explosion from Jan at the sight of the new stuff, but she knows I've got loads of the old Mindstorms kit released 7 or 8 years ago, and she can't tell the difference between old and new (so she hasn't twigged that this is all new gear).

Although I owned the old Lego Robotics Invention System (two sets; the second one having been bought very cheaply in a PC World sell-off), I never managed to get a great deal built or programmed. The old software was VERY basic, but I've got absolutely zero programming in my background, and all of the homebrew alternative programming methods were WAY beyond me. And the basic programming software combined with the basic motors meant that it barely made it out of the box.

The new NXT kit is a different kettle of fish. Firstly it employs a very modern method of pinning everything together (after over 35 years of playing with lego, I'd got a handle on building stuff out of bricks and plates by aligning the studs; the NXT kit uses a newer "studless" construction technique that has me right back at square one trying to figure out even the most basic ways to build anything.

Secondly, the motors are VERY different too. The old Mindstorms kit came with two small and blocky motors that were pretty similar to the motors in the Technic line that Lego had been making for about 25 years; the new motors are HUGE in comparison, they're an odd shape with no studs at all (that "studless construction" again, chaps), but are true stepper motors so they know how far and how fast they rotate (unlike the old motors, where you either had to buy some extra, expensive rotation sensors, or you guessed and hoped for the best).

And thirdly there's the new software. The old set had a truly ghastly command structure, which managed to be both basic, restrictive AND confusing. The new programming suite is graphically-based once again, but manages to be much more comprehensive whilst at the same time being much more intuitive and straightforward. Lego themselves have realised that by embracing an adult fan community, and actively supporting the homebrew firmware and programming languages, they will sell more sets. So having released as much of the internal code as open source stuff as possible, there are already quite a few different programming languages out there based on stuff like Java and C. Like I say, I can't program much more than the ubiquitous two lines of Basic on a WHSmiths' display Spectrum, but I know that this sort of stuff is important to some people. Lego also involved some of that community to actually help develop the current kit, so the included programming suite is much more functional than the old one. Gripes? Just a couple in the ergonomics stakes at the moment. I'd like to be able to zoom in and out of the program area with the mouse wheel (or at all; the software doesn't support ANY zooming, and even a moderately-sized program can span several pages), and it only seems to support one-button mice (a sop to the Mac crowd no doubt, who couldn't run the old software at all; but it's a nuisance not being able to cut & paste stuff using just a right-click).

The new kit seems to contain fewer parts. The old set contained 700-odd parts, but that count included a fair few utterly useles decorative parts (bat wings, anyone?). The new kit contains just over 500, and it does feel like there is less to build with than the old kit. That is also down to the way everything is assembled - the old kit, brick connected to brick; now every piece has to be pinned to another with a couple of axles or pegs; and those pegs push the piece count higher. There are also some odd ommisions - no differential gearbox, for example. And the packaging feels cheap, cheap, cheap (not only was the old RIS box and printed manual impressively sturdy stuff, the NXT kit is decidedly not; it's possibly the poorest packaging for any Lego set I've ever seen. But having not bought much Lego over the last ten years, perhaps ALL the packaging and printed instructions are of this low quality now).

On the other hand, in terms of the premium-cost items in the box, it scores over the old set. The old set had two motors, with no way to count how many times they had turned; the new set has three stepper motors with in-built rotation sensors (so that's about £40-worth of more stuff than the old set straight off). Although there is one less touch sensor (the cheapest and most straightforward sensor in the old lineup), the new kit includes more variety of sensors - not only is there the touch sensor and the light sensor, there's a new sound sensor and best of all an ultrasonic sensor; with the old setup, you either bought an expensive third-party add-on, or you bodged one yourself using components bought off the internet. Added to which, the new programming suite caters for these additional sensors out of the box.

The long and the short of these improvements is that not only have I built two or three robots tonight (OK, all based on the same chassis, and all straight off the included Lego instructions, but hey, it's a start), I managed to work my way through all the simple programming exercises for the first robot myself, ahead of being shown what to do by the Lego software. I even managed to get the robot to behave in the ways that Lauren dictated ("He's got to move forwards, say hello, beep, then spin on the spot" sort of thing). Finally I had it running around the lounge, bouncing off the walls with it saying "ouch" each time before changing direction. The main thing that I learned was that our lounge floor is REALLY filthy, and needs a jolly good sweeping as soon as we can remember where the microfibre mop head is hiding.

Can't wait for my Bluetooth dongle to turn up from Ebuyer. The only major pain with the Mindstorms NXT kit is having to plug the programmable brick into the PC's USB port every time I want to upload a new program. And given that everything is a matter of programming, testing, rewriting the program, testing again, and repeating the whole cycle over and over (usually about 6 times to actually get everything to work well), the socket on the programmable brick wasn't going to last forever. but when I have the dongle, I should be able to send the code straight from the PC to the brick wherever it is in the house.

Just one more gripe. The NXT kit uses cables that are not compatible with the old style of motors and sensors (although conversion cables are available). Fine, I completely understand the methodology - the new sensors and motors need more separate strands as they pass different types of data to the programmable brick. but Lego are also introducing a new line of motors this year (in some Technic sets, and later into their trains), with a new wiring system that's not compatible with either the old wiring OR the new NXT wiring. And the latter incomatability is just daft.

Right - off to program the thing to try and herd Lauren round the lounge now!

No comments: