Lego Mindstorms
From Wikipedia, the free encyclopedia
LEGO Mindstorms is a line of Lego sets combining programmable bricks with electric motors, sensors, Lego bricks, and Lego Technic pieces (such as gears, axles, and beams).
Mindstorms originated from the programmable sensor blocks used in the Lego Dacta line of educational toys. The first retail version of LEGO Mindstorms was released in 1998 and marketed commercially as the Robotics Invention System (RIS). The current version was released in 2006 as Lego Mindstorms NXT.
The original Mindstorms Robotics Invention System kit contained two motors, two touch sensors, and one light sensor. The NXT version has three servo motors and four sensors for touch, light, sound, and distance. Lego Mindstorms may be used to build a model of an embedded system with computer-controlled electromechanical parts. Many kinds of real-life embedded systems, from elevator controllers to industrial robots, may be modelled using Mindstorms.
Mindstorms kits are also sold and used as an educational tool, originally through a partnership between LEGO and the MIT Media Laboratory.[1][2] The educational version of the products is called Lego Mindstorms for Schools, many schools used legos for a fun learning experience, and comes with the ROBOLAB GUI-based programming software, developed at Tufts University[3] using the National Instruments LabVIEW as an engine. The only difference between the educational series, known as the "Challenge Set", and the consumer series, known as the "Inventor Set", is another included light sensor and several more gearing options.
Mindstorms is named after the book Mindstorms: Children, Computers, and Powerful Ideas by Seymour Papert.
Contents |
[edit] Robotics Invention System
[edit] RCX brick
The first generation of LEGO Mindstorms was built around a brick known as the RCX. It contains a Renesas H8/300 microcontroller as its internal CPU. The brick is programmed by downloading a program (written in one of several available programming languages) from a PC or Mac to the brick's RAM via a special infrared (IR) interface. After the user starts a program, an RCX-enabled Mindstorms creation may function totally on its own, acting on internal and external stimuli according to the programmed instructions. Also, two or more RCX bricks can communicate with each other through the IR interface, enabling inter-brick cooperation or competition. In addition to the IR port, there are three sensor input ports and three motor output ports (also usable for lamps, etc). There is also an LCD that can display the battery level, the status of the input/output ports, which program is selected or running, and other information.
Version 1.0 RCX bricks feature a power adapter jack to allow continuous operation instead of the limited operation time when using batteries. In version 2.0, the power adapter jack was removed. Power adapter-equipped RCX bricks are popular for stationary robotics projects (such as robot arms) or for controlling Lego model trains. In the latter context, the RCX needs to be programmed with Digital Command Control (DCC) software required for automated model train operation.
Each RCX, including 1.0 and 2.0, has a unique number printed on it. Little is known about the reasoning behind this number, except for the use of technical support and as a ID number of the RCX for your Lego Mindstorms account on the Lego RCX website(The Lego RCX website was discontinued in 2003)[citation needed].
[edit] Programming Languages
Lego-supplied Languages:
- RCX Code (included in the Mindstorms consumer version sold at toystores)
- ROBOLAB (based on LabVIEW and developed at Tufts University)
Popular Third-party Languages:
- C and C++ under BrickOS (formerly LegOS)
- Java under leJOS or TinyVM
- NQC ("Not Quite C")
- pbFORTH (extensions to the Forth programming language)
- pbLua (An NXT API for the Lua programming language)
- Visual Basic (Through the COM+ interface supplied on the CD)
- RobotC (New Language and NXT Compatible)
- Interactive C (Language similar to C used in robotics competitions.)
- XSLisp an implementation of Lisp for the RCX (1 + 2) and NXT
[edit] LEGO Camera
The LEGO Camera on its own is technically not a robotic toy; rather, it is a normal webcam (a Logitech Quickcam Web) packaged into a LEGO shell. Being a normal webcam, the LEGO Camera is, unlike most Mindstorms products, not programmable and is only usable connected to a PC or some other device that supports USB webcams.
The LEGO Camera is meant to be used with the included Vision Command software which can also interface with an RCX and thus enables creating robots with "vision". The software is capable of detecting different lightings, motion, and colors. It can also be used with any other software that uses a webcam. The webcam is capable of recording up to 30 frames per second. It also contains a microphone to record sound for videos.
[edit] Cybermaster
Cybermaster was mainly sold in Europe and Australia/New Zealand, but was available for a short time in America via the Lego Club magazines. It was aimed at a younger audience as an early attempt of merging computer gaming with robotics and LEGO. The Pbrick shares many, especially software, features with the RCX but differs in appearance and technical specifications: 1 output (plus 2 built-in) and 3 sensors.
- It uses RF (27 MHz R/C band) instead of IR for communication.
- It has two built-in motors with integrated tachometers and speedometers.
- It is limited to passive sensors (a simple A/D with internal pull-up resistors).
- The sensors shipped with it are color coded and have internal resistors in their open state (allowing the Pbrick to sense which sensor is attached to which port).
- It has a fixed firmware (so it cannot be upgraded or replaced).
- It has limited RAM for programs and only one program slot.
Despite its obvious limitation it has a number of advantages over its 'big brother', the RCX.
- The RF link has greater range and is omnidirectional.
- The built-in tachometer and speedometer sensors on the internal motors provides the same function as the external rotation sensor to the RCX, but without using up sensor ports.
This makes it very useful for various mobile platforms and performing basic motion/positioning tasks.
It talks the same protocol as the RCX but cannot communicate directly to it (due to IR vs RF) but with a repeater (a computer with 2 serial ports and a simple program) they can be integrated.
[edit] Codepilot
Sold as part of the Barcode Truck kit. This unit was the first programmable brick (or Pbrick). It features a single motor, a single touch sensor and a light sensor. It is programmed by setting it to 'learn' and using the light sensor to feed barcoded commands. The command set is very limited. Since barcode is just a series of variances in light, this form of command entry was dubbed VLL (Visual Light Link) and has been used in several later Lego models.
[edit] Scout
Lego also released a brick named the Scout, which has 2 sensor ports, 2 motor ports, a built in light sensor, and no PC interface. It came with the Robotics Discovery Set. The Scout can be programmed, but the user usually selects one of a collection of built-in programs. In order to program the Scout, a user must enable "power mode" on it. The Scout can store one program.
There was a plan for Lego to create a booster set that allows you to program the Scout from a computer with a Scout version of the RCX code. However due to the complexity of this project, it was abandoned.
The RCX can control the Scout brick using the Send IR Message program block. The RCX does all of the controlling, and therefore can be programmed with the PC, while the Scout acts as a "slave". The Scout brick must have all of its options set to "off".
The Scout is also capable of using VLL to control a Micro Scout.
An Overview of the Scout Brick and its peripherals.
[edit] Micro Scout
The Micro Scout was added as an entry level to Lego robotics. It is a very limited Pbrick with a single light sensor and a single built-in motor. It has seven built-in programs and can be controlled by a Scout, Spybotics or RCX unit using VLL.
The unit was sold as part of the Droid Developer Kit (featuring R2D2) and later the Darkside Developer Kit (featuring an AT-AT Imperial Walker).
[edit] Spybotics
Spybotics was more of an attempt to expand on the Cybermaster line. The kits were sold together with a computer game where part was played on the computer and part was played by controlling the Spybot to solve a number of fixed missions. The Pbrick itself shares many features with the Cybermaster, but it has no tachometers or speedometers and a single integrated touch sensor.
It also features a light sensor which doubles as computer interface. This interface can also be used to connect to the Scout, Micro Scout and possibly the Codepilot using VLL. It has an expanded IR functionality allowing it to communicate with other Spybots or RCX units. The IR unit also has limited direction and range function, allowing it to track and locate other Spybots, IR Remote Controls/beacons or RCX units.
[edit] LEGO Mindstorms NXT
LEGO Mindstorms NXT is a programmable robotics kit released by Lego in July 2006, replacing the first-generation LEGO Mindstorms kit.[4] The kit consists of 519 Technic pieces, 3 servo motors, 4 sensors (ultrasonic, sound, touch, and light), 7 wires, a USB cable, and the NXT brick. It also includes NXT-G, a graphical programming environment that enables the creation and downloading of programs to the NXT.
The NXT is the "brain" of a Mindstorms robot. This computer-controlled LEGO brick lets the robot autonomously perform different operations.
[edit] Programming languages
Name | Language type(s) | Notes | URL |
---|---|---|---|
Actor-Lab | Custom flowchart-like language | [1] | |
Ada Interface to MindStorms | Ada | [2] | |
brickOS | C/C++ | [3] | |
GCC | C/C++, Objective C, Fortran, Java, Ada among others | [4] | |
GNU Toolchain for h8300 | C/C++, ASM | [5] | |
LabVIEW | National Instruments LabVIEW Visual programming language (G code) | Core language used to develop Mindstorms NXT software. Can use available add-on kit to create and download programs to NXT, create original NXT blocks or control robot directly via USB or Bluetooth using NXT fantom.dll | [6] |
Lego.NET | Anything that can compile to .NET, works best with C# | Does not come with a compiler, converts bytecode to machine code | [7] |
LEGO::NXT | Perl | Set of Perl modules providing real-time low-level control of a LEGO NXT brick over Bluetooth. | [8] [9] |
leJOS | Java | A java based system for advanced programers can handle most sensors and things like GPS speech recognition and mapping tecnology. Can be interfaced with the Eclipse IDE or run from the command line | [10] |
[[nxtOSEK] | C | [11] | |
librcx | C/C++ | A library for GCC | [12] |
Logitech SDK | Visual Basic, Visual C++ | Can be combined with an RCX control library such as spirit.ocx from the MindStorms SDK to make use of the Lego Cam | [13] |
MicroWorlds EX Robotics Edition | This is a program in the MicroWorlds series that allows students to control the NXT. | [14] | |
NQC | NQC, a C-like language | This is the most widely used unofficial language | [15] |
NXT++ | C++ | Allows you to control the NXT directly from any C++ program. | [16] |
Official Mindstorms SDK | Visual Basic, Visual C++, MindScript, LASM | You do not need VB to use the VB features as MS Office comes with a cut down version of VB for making macros | [17] |
OnScreen | A custom language which can be programmed directly on the RCX | [18] | |
pbForth | Forth | [19] | |
PBrickDev | PBrickDev, a flowchart based language. | Has more functionality than the RIS language, such as datalogs and subroutines/multithreading. | [20] |
PRO-BOT | A kind of Visual Basic/spirit.ocx-based language | Designed for robots which are in contact with the workstation at all times | [21] |
QuiteC | C | A library for use with GCC and comes with GCC for Windows. | [22] |
RCX Code | RCX Code, a custom flowchart-based language | Included in the Mindstorms consumer version sold at toystore | [23] |
ROBOLAB | A flowchart language based on LabVIEW | This is the programming environment offered to schools who use MindStorms, supports the Lego Cam | [24] |
ROBOTC | A multi-platform C programming language designed for the programmer in need of powerful debugging tools for the NXT, RCX, VEX, and soon-to-be FIRST Controller (for FRC). | ROBOTC gives the ability to use a text-based language based on the C programming language. It includes built-in debugger tools, as well as (but not limited to) code templates, Math/Trig operations (sin, cos,tan, asin,acos... etc), user-friendly auto-complete function built into the interface, built-in sample programs | [25] |
RWTH - Mindstorms NXT Toolbox | MATLAB | Interface to control the NXT from MATLAB via Bluetooth (OpenSource). | [26] |
SqLego | Squeak | [27] | |
TclRCX | Tcl | [28] | |
Terrapin Logo | LOGO | [29] | |
TinyVM | Java | A predecessor to the lejos language. An open source Java based replacement firmware for the Lego Mindstorms RCX microcontroller. | [30] |
The Transterpreter | occam | [31] | |
Gostai URBI for Lego Mindstorms NXT | URBI, C++, Java, Matlab | Easy to use parallel and event-driven script language with a component architecture and opensource interfaces to many programming languages | [32] |
Vision Command | RCX Code | The official programming language for use with the Lego Cam, that allows you to control your robot with color, motion, and flashes of light. | [33] |
XS | Lisp | [34] | |
LegoLog | Prolog | Uses an NQC program to interpret commands send from the PC running the Prolog code | [35] |
Microsoft Visual Programming Language (VPL) | Graphical flowchart, based on .NET | With the Microsoft Robotics Studio, it uses a native NXT program msrs to send and receive messages to and from a controlling program on a computer via Bluetooth | [36] |
DialogOS | Graphical Flowchart for voice controlled robots | DialogOS combines speech recognition and speech synthesis with robotics, enabling you to build talking robots that react to your voice commands. | [37] |
Processing | Java | Processing (programming language) is an open source programming language and environment for people who want to program images, animation, and interactions. It is used by students, artists, designers, researchers, and hobbyists for learning, prototyping, and production. To control the NXT with Processing you can use the NXTComm Processing library developed by Jorge Cardoso. | [38], [39] |
Interactive C | C-style language. | Language developed for the Botball robotics competition | [40] |
[edit] Community
There is a strong community of professionals and hobbyists of all ages involved in the sharing of designs, programming techniques, and other ideas associated with Lego Mindstorms. The Lego Mindstorms system/website is organized much like a wiki, harnessing the creative potential and collaborative efforts of participants. LEGO also encourages sharing and peering by making software codes available for downloading and by holding various contests and events.
[edit] See also
- FIRST Lego League
- RoboCup Junior
- Legoscript
- Vex
- Big Trak
- iRobot Create
- LabVIEW
- Robofest
- Actor Lab
- The Robotic Workshop
- URBI
- Lego Logo, an earlier use of LEGO bricks with computer control.
[edit] Notes
[edit] References
- Bagnall, Brian. Maximum LEGO® NXT: Building Robots with Java Brains Variant Press. 2007. ISBN 0-9738649-1-5
- Bagnall, Brian. Core LEGO® Mindstorms Prentice-Hall PTR. 2002. ISBN 0-13-009364-5
- Baum, Dave. Definitive Guide to LEGO® MINDSTORMS, 2nd ed. Apress. 2002. ISBN 1-59059-063-5.
- Erwin, Benjamin. Creative Projects with LEGO® Mindstorms (book and CD-ROM). Addison-Wesley. 2001. ISBN 0-201-70895-7.
- Ferrari et al. Building Robots With LEGO® Mindstorms: The Ultimate Tool for Mindstorms Maniacs. Syngress. 2001. ISBN 1-928994-67-9.
[edit] External links
- Official Lego Mindstorms (NXT)
- Official Robotics Invention System
- Lego Mindstorms at the Open Directory Project
|