Lego Mindstorms NXT
||It has been suggested that Lego Mindstorms NXT 2.0 be merged into this article. (Discuss) Proposed since November 2013.|
LEGO Mindstorms NXT is a programmable robotics kit released by Lego in late July 2006. It replaced the first-generation Lego Mindstorms kit, which was called the Robotics Invention System. The base kit ships in two versions: the Retail Version (set #8527) and the Education Base Set (set #9797). It comes with the NXT-G programming software, or optionally LabVIEW for Lego Mindstorms. A variety of unofficial languages exist, such as NXC, NBC, leJOS NXJ, and RobotC. A new version of the set, the new Lego Mindstorms NXT 2.0, was released on August 1, 2009, featuring a color sensor and other upgraded capabilities. There is now a new Lego Mindstorms Robot, called the EV3.
- 1 NXT Intelligent Brick
- 2 Programming
- 2.1 NXT-G
- 2.2 C# with Microsoft Robotics Developer Studio
- 2.3 BricxCC, Next Byte Codes, Not eXactly C
- 2.4 Robolab
- 2.5 RoboMind
- 2.6 Enchanting
- 2.7 ROBOTC
- 2.8 NXTGCC
- 2.9 leJOS NXT
- 2.10 nxtOSEK
- 2.11 ICON
- 2.12 MATLAB and Simulink
- 2.13 Lua
- 2.14 Ada
- 2.15 URBI
- 2.16 FLL NXT Navigation
- 2.17 Ruby-nxt
- 2.18 Robotics.NXT
- 2.19 LibNXT
- 2.20 C_NXT
- 2.21 PyNXC
- 2.22 NXT-Python
- 2.23 LEGO Mindstorms EV3 Software
- 2.24 Physical Etoys
- 2.25 C/C++ Interpreter Ch
- 3 Sensors
- 4 See also
- 5 Notes
- 6 External links
NXT Intelligent Brick
The main component in the kit is a brick-shaped computer called the NXT Intelligent Brick AKA(Ciara). It can take input from up to four sensors and control up to three motors, via a modified version of RJ12 cables, very much similar to but incompatible with RJ11 phone cords. The plastic pin to hold the cable in the socket is moved slightly to the right. The brick has a 100×60 pixel monochrome LCD and four buttons that can be used to navigate a user interface using hierarchical menus. It has a 32-bit ARM7TDMI-core Atmel AT91SAM7S256 microcontroller with 256KB of FLASH memory and 64KB of RAM, plus an 8-bit Atmel AVR ATmega48 microcontroller, and bluetooth support. It also has a speaker and can play sound files at sampling rates up to 8 kHz. Power is supplied by 6 AA (1.5 V each) batteries in the consumer version of the kit and by a Li-Ion rechargeable battery and charger in the educational version.
The Intelligent Brick remains unchanged with NXT 2.0. A black version of the brick was made to celebrate the 10th anniversary of the Mindstorms System with no change to the internals.
Firmware and developer kits
Several developer kits are available that contain documentation for the NXT:
- Software Developer Kit (SDK), includes information on host USB drivers, executable file format, and bytecode reference
- Hardware Developer Kit (HDK), includes documentation and schematics for the NXT brick and sensors
- Bluetooth Developer Kit (BDK), documents the protocols used for Bluetooth communications
Very simple programs can be created using the menu on the NXT Intelligent Brick. More complicated programs and sound files can be downloaded using a USB port or wirelessly using Bluetooth. Files can also be copied between two NXT bricks wirelessly, and some mobile phones can be used as a remote control. Up to three NXT bricks can communicate simultaneously via Bluetooth when user created programs are run.
The retail version of the kit includes software for writing programs that run on Windows and Mac OS personal computers. The software is based on National Instruments LabVIEW and provides a visual programming language for writing simple programs and downloading them to the NXT Brick. This means that rather than requiring users to write lines of code, they instead can use flowchart like "blocks" to design their program.
NXT-G v2.0 is a graphical programming environment that comes bundled with the NXT. With careful construction of blocks and wires to encapsulate complexity, NXT-G can be used for real-world programming. Parallel "sequence beams" are actually parallel threads, so this software is quite good for running a handful of parallel sense/respond loops (example: wait 60 seconds, play a "bonk" sound at low volume if battery is low, loop), or blending autonomous control with bluetooth or other "remote control". The language supports virtual instruments for all LEGO branded and most 3rd party sensors/components. Version 2.0 contains new tutorial challenges, a remote control, custom graphics and sound designers, and new LEGO color sensor support. Community support is significant, for example: http://www.brickshelf.com/cgi-bin/gallery.cgi?f=191310
C# with Microsoft Robotics Developer Studio
Free tools (Visual Studio Express in combination with the Robotics Developer Studio) enable programming the NXT using the C# language. Other supported languages include IronPython and VB.NET.
BricxCC, Next Byte Codes, Not eXactly C
Bricx Command Center (BricxCC) is the integrated development environment (IDE) used to write, compile, and edit NBC and NXC programs for the NXT. Also, as BricxCC was originally made for the RCX, programs for it can be written using NQC via BricxCC. Different firmwares can be flashed to the NXT using BricxCC.
BricxCC has many utilities such as NeXTExplorer (upload/download files, defragment the NXT, use file hex viewer), NeXTScreen (view what's on the NXT's LCD, and capture images and video).
Next Byte Codes (NBC) is a simple open source language with an assembly language syntax that can be used to program the NXT brick. BricxCC also has the capability to decompile standard .rxe NXT executables to NBC
Not eXactly C (NXC) is a high level open-source language, similar to C, built on the NBC compiler. It can also be used to program the NXT brick. NXC is basically NQC for the NXT. It is one of the most widely used third-party programming languages for the NXT. In NXC, even creating video games for the NXT is possible. Some people have even got working grayscale on the NXT Screen.
Robolab 2.9 Robolab is the newer programming environment originally used on the RCX programmable brick. Version 2.9 has been updated so that it can be used to program the NXT brick. Lego has announced that it will stop officially supporting Robolab but Robolab 2.9 is still available and there are still many user forums and other sources of help available.
RoboMind is educational software that is specially developed to teach students about logic, programming and robotics. The strength of RoboMind is the compactness of the learning environment, which allows to quickly develop and test scripts in a virtual environment. The scripts can then directly be transferred to a Lego Mindstorms NXT robot, to see the result in real life. RoboMind script run on the standard firmware.
Enchanting brings NXT programming into the popular Scratch IDE, designed by the Lifelong Kindergarten Group at MIT to make programming intuitive even for young children. The resulting NXT programs have the compactness and clarity offered by that programming environment.
Carnegie Mellon Robotic's Academy, ROBOTC is a programming-language based on C for VEX, the new VEX Cortex, FIRST Tech Challenge, and Lego Mindstorms. ROBOTC runs a very optimized firmware which allows the NXT to run programs very quickly, and also compresses the files so that you can fit a large amount of programs into your NXT. Like other NXT languages, ROBOTC requires this firmware to be downloaded from the ROBOTC interface in order to run.
NXTGCC is a GCC toolchain for programming the NXT firmware in C.
- MATLAB is a high-level programming language for numerical computing, data acquisition, and analysis. It can be used to control Lego NXT robots over a Bluetooth serial port (serial port communication is part of the base functionality of MATLAB) or via a USB connection; for example using the RWTH - Mindstorms NXT Toolbox (free & open-source).
- Simulink is a block diagram environment for modeling and simulating dynamic systems. Using Simulink, a user can design and simulate control algorithms and LEGO systems, and subsequently automatically program the LEGO NXT or EV3. Support for programming the Lego NXT or EV3 only requires Simulink and is available at no additional charge.
MATLAB and Simulink Support for LEGO MINDSTORMS programming is freely available. More information found at:
A port of GNAT is available for the NXT. It relies on a dedicated run-time kernel based on the Ravenscar profile, the same used on the Goce satellite: this permits to use high-level Ada features to develop concurrent and real-time systems on the Mindstorms NXT.
URBI is yet another language and is a parallel and event-driven language, with interfaces to C++/Java and Matlab. It also has a component architecture (UObject) for distribution. Urbi is compatible with many robots, including Nao (cf Robocup), Bioloid or Aibo.
FLL Nxt Navigation An open source program to help navigation on the FLL competition table. It uses NXT-G and .txt files to write programs. It is unknown if you can legally implement this in FLL competitions.
Ruby-nxt is a library to program the NXT for the Ruby programming language. Unlike the other languages for the NXT the code is not compiled to a binary file. Instead the code is directly transmitted to the NXT via a Bluetooth connection.
Robotics.NXT is a Haskell interface to NXT over Bluetooth. It supports direct commands, messages and many sensors (also unofficial). It has also support for a simple message-based control of a NXT brick via remotely executed program (basic NXC code included).
LibNXT is a utility library for talking to the Lego Mindstorms NXT intelligent brick at a relatively low level. LibNXT is targeted mainly at the platforms that the official Lego Mindstorms NXT software overlooks, namely Linux and other unices. It will work on any POSIX-compliant operating system where libusb 0.1 <http://libusb.sf.net/> is supported. Windows support is also possible with the win32 port of libusb.
C_NXT is a library for controlling the Lego NXT licensed under the GPLv2. The library allows users to control a Lego NXT via bluetooth controller from within other C programs. The library provides low level control and high level abstraction. The library only runs on GNU+Linux.
NXT-Python is a python module, which communicates with the NXT via USB or Bluetooth. It supports direct commands and several aftermarket sensors.
LEGO Mindstorms EV3 Software
The software which ships with the newer Mindstorms EV3 set can be used to program the NXT. At the moment, Bluetooth is not supported for the NXT, so programs must be downloaded via a USB cable.
Physical Etoys is a visual programming system for different electronic devices. It supports direct mode and compiled mode.
C/C++ Interpreter Ch
Ch is a C/C++ interpreter running C/C++ code to control Lego NXT or EV3. No firmware upload/download is required, no compilation is needed. A C/C++ code running in Ch can control either a Lego NXT, EV3, or multiple of NXT/EV3.
The Lego Mindstorms NXT 1.0 base kit includes:
- 3 identical servo motors that have built-in reduction gear assemblies with internal optical rotary encoders that sense their rotations within one degree of accuracy.
- The touch sensor detects whether it is currently pressed, has been bumped, or released. The orange Enter button and the gray right and left NXT buttons can be programmed to serve as touch sensors. In the NXT-G programming software, a value of 0 is given out when it is not pressed, and a value of 1 is given out if it is pressed down.
- The light sensor detects the light level in one direction, and also includes a LED for illuminating an object. The light sensor can sense reflected light values (using the built-in red LED), or ambient light. In the NXT-G programming software the sensor senses light on a scale of 0 to 100, 100 being very bright and 0 being dark. If calibrated, the sensor can also be used as a distance sensor.
- The sound sensor measures volume level on a scale of 0 to 100, 100 being very loud, 0 being completely silent.
- The ultrasonic sensor can measure the distance from the sensor to something that it is facing, and detect movement. It can show the distance in both centimeters and inches. The maximum distance it can measure is 233 cm with a precision of 3 centimeters. The ultrasonic sensor works by sending out ultrasonic sound waves that bounce off an object ahead of it and then back. It senses the time it took for that to happen. In the Lego Mindstorms 2.0 base kit, it includes: 2 Touch sensors, one Color sensor (detects several different colors), and an Ultrasonic sensor.
These parts are not included in the Lego Mindstorms NXT base kit and may be bought separately:
- Third-party companies also manufacture sensors such as the compass, gyroscope, infrared tracker, RFID reader and accelerometer sensors sold by Lego.
- The temperature sensor can measure temperature in Celsius or Fahrenheit.
The sensors come assembled and programmed. In the software (see Programming above), people can decide what to do with the information that comes from the sensors, such as programming the robot move forward until it touches something.
Lego also sells an adapter to the Vernier sensor product line. Vernier produces data collection devices and related software for use in education.
Sensors are connected to the NXT brick using a 6-position modular connector that features both analog and digital interfaces. The analog interface is backward-compatible (using an adapter) with the older Robotics Invention System. The digital interface is capable of both I2C and RS-485 communication.
- Braigo Braille Lego printer low-cost project
- Lego Mindstorms EV3
- Lego Mindstorms NXT 2.0
- Lego Mindstorms
- Robotics Invention System
- Robotics suite
- Dexter Industries - Sensors for the Lego Mindstorms NXT
- FIRST Lego League - A competition with the Lego Mindstorms NXT robot
- RobotAppStore - Apps for Robots (including Lego Mindstorms NXT)
- "What's NXT? LEGO Group Unveils LEGO MINDSTORMS NXT Robotics Toolset at Consumer Electronics Show" (Press release). Las Vegas, NV: The Lego Group. January 4, 2006. Retrieved 2007-09-17.
- "8527Mindstorms NXT Kit". Mindstorms Website. LEGO Group. Retrieved 2008-12-26.
- "LEGO MINDSTORMS Education NXT Base Set". Lego Education Website. Lego Group. Retrieved 2011-09-30.
- "LEGO Education - LabVIEW for LEGO MINDSTORMS".
- "All the tools to take your LEGO Mindstorms NXT to the Extreme!". Archived from the original on 6 October 2009.
- Peek, Brian (2007-07-16). Microsoft Robotics Studio and LEGO Mindstorms NXT. Sample Project on coding4fun. MSDN Channel 9, 16 July 2007. Retrieved from http://channel9.msdn.com/coding4fun/articles/Microsoft-Robotics-Studio-and-LEGO-Mindstorms-NXT.
- Next Byte Codes and Not eXactly C
- NBC/NXC Next Byte Codes and Not eXactly C
- LeJOS, Java for Lego Mindstorms
- URBI NXT Page
- "LEGO.com Support - Frequently Asked Questions". lego.com. Retrieved 2014-05-11.
- Ch Mindstorms
- Lego Mindstorms NXT base kit parts
- Servo motors
- Touch sensor
- Light sensor
- Ultrasonic sensor
- Extra parts
|Wikimedia Commons has media related to Lego Mindstorms.|
- Official website
- lego.Edutech.com, Official LEGO Education partner
- external controller with open hardware beaglebone
- Program NXT, help for programming your Lego Mindstorms NXT
- Lego Mindstorms NXT at DMOZ
- Mindstorms at DMOZ
- HiTechnic.com, LEGO Certified Sensors for the LEGO MINDSTORMS
- mindsensors.com, Sensors for the LEGO MINDSTORMS NXT
- Trinfactor3.com, Enables use of 32 analog sensors with 1 NXT
- robojoy-club, NXT robot and program for beginner
- Roberta, Educational Robotics
- Lego Mindstorms Community and Projects
- Read This Review Before You Buy LEGO Mindstorms EV3