Mindstorms in Education
Pages: 1, 2
Lots of development options
The brain of the Mindstorms Robotics Invention System is an oversized brick called the RCX. The RCX is a small computer that can control motors and read sensor values. By writing software for the RCX, you determine how your robot behaves.
One of the reasons the RCX is such a great platform for teaching is its versatility. There are many choices for developing programs for the RCX, from graphical environments suitable for novices to advanced environments based on C++, Smalltalk, and Java.
People who haven't ever programmed before usually start with one of the graphic environments, either RIS Code, which comes with the Robotics Invention System, or ROBOLAB, which can be bought from Pitsco-LEGO DACTA. Both pieces of software allow the student to create programs by dragging functional blocks into a sequence with the mouse. For example, you might string together blocks to set the direction of the motors and turn them on. Other more complex blocks allow for building loops and reacting to the values of sensors.
RIS Code is great for people who haven't programmed before, but it has its limitations. First, RIS Code only runs on Windows. Second, it doesn't allow the use of variables. ROBOLAB addresses both of these concerns, to some degree: it runs on MacOS and Windows, and it allows for more complex programming.
The Unofficial Guide to LEGO MINDSTORMS Robots
Beyond the graphic environments, powerful tools are available for free on the Internet for programming the RCX in C, C++, Forth, Java, Visual Basic, and other languages. The most popular options are:
- NQC (Not Quite C) is a language designed by Dave Baum. It has a syntax that is similar to C. The compiler is free, and versions of the software are available for Linux, MacOS, and Windows. It's the next logical step beyond the graphic environments, and it provides ample power for many applications.
- legOS is an operating system written by Markus Noga. It is built using the GNU cross compiler. It's possible to work with legOS on Windows, but Linux users will be most comfortable with it. It opens up the whole power of the RCX to your programs and is proportionally harder to use than NQC.
At WWU, Lego robots were used in two classes: one on robotics and one on artificial intelligence (AI). The RCX was flexible enough to handle both subject areas. The RCX is lightweight, computationally speaking: a 16-MHz processor and 32 kilobytes of RAM are minuscule by today's desktop computer standards. However, AI has undergone a fundamental shift in recent years that makes a small platform like the RCX a good choice for exploring algorithms and behavior.
While the AI course focused on software and behavior, the robotics class focused on hardware, particularly sensors. The students explored many types of sensors, going well beyond the usual touch and light sensors that come with RIS. According to John Lorenz, Pitsco-LEGO DACTA has "air pressure sensors, motion sensors, sound sensors, pH sensors, and even humidity sensors, all of which connect to any Mindstorm set with a simple yet horribly overpriced adapter." Students also created their own sensors, which are easy to connect to the RCX.
Meanwhile, at the Universität Osnabrück, Axel Schreiner teaches a far-ranging course on robot programming. There, the RCX's flexibility makes it a great platform: The course covers just about every development option for the RCX, from Spirit.ocx programming through NQC, pbFORTH, legOS, a Java Virtual Machine for the RCX, and many other environments. Axel uses several other platforms in his classes, including fischertechnik. "I marvel most about the fact that Fischer has been hooking up to computers for 15 years and has the much more sophisticated platform (mechanical and interface they beat Lego hands down), but has not created the enthusiasm Lego did. In part I blame it on the rather annoying closed serial interface they put out in 1997. Before, you needed to drag around an umbilical cord; now you can only download using their own programming system, which is a bit old-fashioned."
At $200, the Robotics Invention System sounds like an expensive toy. It's actually an excellent value. If you tried to assemble a similar kit elsewhere, you would probably end up with something more expensive that was much harder to use. Teachers are almost always on a limited budget; RIS provides a reasonably-priced package with a lot of power and flexibility. This one kit provides enough computational power, software options, and mechanical versatility to last through at least a semester, possibly two.
John Lorenz said "When I first saw the price tag, my eyes popped out of my head. Since then, I haven't found any robot systems that are as flexible and as cheap as a Mindstorm set."
Lego robots are the tool of choice for teaching a variety of topics: robot construction, real-world programming, and artificial intelligence. The combination of learning and fun, software flexibility, and low cost makes Lego robots extremely attractive. Don't just take my word for it, though: Go to your favorite search engine and look for something like "syllabus mindstorms." At Google, a simple search produced links for Mindstorms-related classes at Duke, Lawrence Technological University, University of Southern California, Toin University of Yokohama, Rensselaer Polytechnic Institute, Centralia College, Indiana University, Smith College, and more. If you are an educator, consider jumping on this wagon. You'll have a lot of support from a worldwide community.
Also this week:
Open Source Roundtable: Where's That Lizard?!
Read more Lego Mindstorms columns.
Discuss this article in the Mindstorms Forum.
Return to O'Reilly Network Home.