Lego, My Ego

By Chris Oakes
Wired News

September 23, 1998

A little computer intelligence and a software-development tool are transforming static Lego constructions into lively, responsive robots. But some users always want more.

The Lego toy company completed initial shipments of its Mindstorms Robotic Invention System [ http://www.legomindstorms.com/ ] to stores last week, and the first robotics product to make a splash in the retail market has already taken on a life of its own.

Just as people took to hacking PalmPilots [ http://wired.com/news/technology/0,1282,10402,00.html ] earlier this year, Mindstorms enthusiasts have already cracked the guts of the Lego system and come up with their own inventions.

"It was [education pioneer and Lego enthusiast] Seymour Papert's vision to stuff a computer inside a Lego brick, and that vision is finally being realized today," said Lego Mindstorms spokesman John Dion. Papert, an early pioneer in artificial intelligence at Massachusetts Institute of Technology, developed the "Logo" programming language in the early 1980s.

Though no hard numbers are in, Dion says about half of the buyers of the US$200 Mindstorms system are young teens and the other half are adult men, reflecting the system's mixed appeal for eager kids, experienced hackers, and robot hobbyists.

For decades, Lego construction sets have provided snappable, stackable plastic bricks for kids to create landscapes, buildings, or whatever else their imaginations can produce. Mindstorms adds one computerized brick -- Lego's RCX microcontroller -- and a set of software "bricks" that are snapped together on a PC screen and transmitted to the smart Lego piece with an infrared beam.

The creation, or robot, has sensors that respond to pressure and light. The sensors feed data into the microcontroller and a series of motors take on-off-driven actions -- moving, turning, swinging, wheeling forward, stepping back -- as programmed by the user.

With Mindstorms, "you're making something and it's doing exactly what it is you wanted it to do," Dion said. "It's like software, but it's in the real world."

Sounds simple enough, but Mindstorms enthusiasts are putting the system through remarkable robotic hoops and stretching the software farther still. So far, that has meant translating RCX -- the Mindstorms scripting language that runs on the PC ­- into the popular and programmer-compatible C++ language. Hackers also hope to port the Windows-only RCX over to other platforms, such as Macintosh and Unix-based Linux.

Their primary goal is to improve the flexibility and portability of the instructions that control Mindstorms. Coders could write and send instructions to the RCX controller's infrared port via handheld, infrared-enabled computer devices, including the PalmPilot and the Hewlett-Packard HP 100LX [ http://www.magicnet.net/~twdow/mindstorms.html ] palmtop computer.

Other reverse engineers plan to create completely new firmware -- the hardware brain of the Lego computer controller -- to make a more capable device.

"Lego Mindstorms hasn't told us how to download executables -- only byte-code programs," wrote reverse engineer Russell Nelson in an email. "There's no documentation for writing native-code language. But we'll figure out how to do our own firmware, before too long."

The standard Mindstorms system has been used to create alarm devices that sense when someone passes through a doorway; coin-sorters that distinguish coins by detecting their diameter; card-dealing robots (tried and tested, though ultimately rejected, in Las Vegas); a candy dispenser that dishes up sweets according to simple bar codes; and a wandering robot that takes random pictures with an onboard camera. The devices are intelligent enough to follow paths (via markings on the floor), scare cats, and even make copies, according to the company.

Enthusiasts are collecting and displaying their findings online. For example, one Stanford University student site features pictures [ http://graphics.stanford.edu/~kekoa/rcx/ ] that show the Lego electronics disassembled and dissected for hardware hacking. On other sites, the values of commands that can be sent to the controller's hardware have been analyzed and itemized.

The first step, explains Lego-lover and hacking hobbyist Matthew Miller, a system administrator at Boston University, is to take it apart and look at it.

"There's sort of an intrigue that Lego has. It has a strong [technology] theme," said Miller, citing the occurrence of Lego in the Microsoft-set novel by Douglas Coupland, Microserfs. "Geek people like Lego."

Meanwhile, the Lego Mindstorms group sits back and marvels at the geeks' innovations.

"It hasn't been on the shelf that long, but I think over the next number of months that we'll really see it pushed to its extremes," said Dion. "I don't think we ourselves know where it's going to end up."

Three expansion sets already can expand the core Lego Mindstorms capabilities -- RoboSports, Extreme Creatures, and Exploration Mars.

Even more intriguing to MIT's Fred Martin is the idea of smaller, yet simpler, Mindstorms systems that he and others at the Media Lab are beginning to prototype. "You plug together sensors and motors and they form a self-aware network that [software] can talk to."

In that sense, Mindstorms could be the toy realization of a future envisioned by the tech industry at large where, as Martin says of future Lego incarnations, "Computation is everywhere."

Copyright 1998