Custom Control Panel / Cockpit Builder for Lego Mindstorms

Custom Control Panel / Cockpit Builder
for Lego Mindstorms Robotics System

Alan McCutchen - amccutch@mindspring.com
January 22, 1999

Using DataViews and Visual Basic, it was simple to construct a custom editor aimed at building displays that control and monitor the Lego Mindstorms Robotics System. Lego Mindstorms is targeted to users 12 years and above, mostly because of the programming required (even though the programming is Visual). The standard scenario has been for the user to first build an object out of Lego pieces, and then use the Lego visual programming environment to write code that is downloaded to the Lego RCX. Once downloaded, the program then runs autonomously from there. Very cool stuff, but pretty challenging for non-programmers and users without an understanding of logic.

The DataViews concept was that beginners and very young people might enjoy directly controlling the Lego objects via their computers. They might also enjoy monitoring their Lego constructions as controlled by built-in or 3rd party RCX programs. This would help break the ice, and likely lower the age requirements for the product. To differentiate this approach from the various "canned" Lego Mindstorms control panels (available today as shareware on the Internet), we built a simple interface builder. This lets the interface be constructed in a Lego-like fashion too, and extends the creative possibilities to the computer side of things!

RCX configuration dialog

First, the a point-and-click interface is used to describe the wiring.

Future versions of the RCX may include the capability to query the RCX to see what's connected
- with or without a downloaded and selected program. For Mindstorms 1.0/2.0, this dialog lets the user
tell us how to internally configure the RCX ports.

The Custom Editor and Object Palette

The user can build a monitoring / control cockpit by selecting a palette object and doing a drag-and-drop into the display.
Double-clicking on the object brings up the dialog below where the RCX port may be selected.

Once constructed, the user may enter a "Run" mode from the menu. In this mode, the computer establishes
a continuous link with the RCX, sending commands and querying states. The sensors are always "read-only",
but the motors and lamps may be both monitored and controlled.

While the objects on this palette are very simple, very little time was available to draw a library of professional-looking parts.
These simple parts would probably work best as overlays on top of images, perhaps grabbed by a QuickCam.

Along with graphical objects on the palette, it would also be possible to include behavioral objects.
For example, a behavioral object called "reverse when blocked" might require connection to a sensor and a motor.
DataViews provides a Rules capability which can manipulate data vars based upon the value of other data vars,
thus when the sensor value goes from 0 to 1, the motor value could be changed from 10 to -10.
Using DataViews DV-Centro component, even more advanced behaviors could be constructed.

The RCX port selector

When a graphical object is double-clicked, the RCX port selection dialog is displayed.
The user simply clicks on an RCX port, and a check appears to acknowledge the selection.
This establishes a connection between the graphical object and the real-world Lego Mindstorms component.