You are hereGetting to Grips with Installing, Updating and Programming LEGO Mindstorms Kits
Getting to Grips with Installing, Updating and Programming LEGO Mindstorms Kits
There is so much noise around LEGO Mindstorms on the web with enthusiasts and universities all attempting to do the NeXT big thing that it is hard for kids wanting to do more with their Mindstorms kit to figure out what is happening.There are three different Mindstorms kits and on top of this there is a plethora of tools for programming, different versions of NXT firmware and NXT software. Plus LEGO has changed the Mindstorms update pages on their website since release of NXT 2.0, so most old links don’t work any more, including links provided within the kit 8527 software. This article provides concise information and resources to budding Mindstormers.

Terminology
Let’s get the terms clear first. So far the three Mindstorms retail kits from LEGO are named Mindstorms 1.0 also called Robotics Invention System (RIS), Mindstorms NXT (kit 8527) and Mindstorms NXT 2.0 (kit 8547).
There is also an educational (non-retail) version of the NXT called NXT EDU (kit 9797) and educational extensions to the NXT (kit 9648) mainly for universities and schools. This article focuses more on the NXT series retail kits than on the RIS and educational kits.
LEGO Software
The visual programming language shipped with RIS was called ROBOLAB. The visual programming language shipped with the NXT kits is called NXT-G. Kit 8527 came with version 1.0 of NXT-G. Afterwards a patch was released for NXT-G 1.0 which added dynamic block update functions. This allowed for additional sensor blocks to be imported into the software and it also allows older sensors from the RIS to be used with the NXT-G. Patched NXT-G 1.0 became NXT-G version 1.1.
Later versions of kit 8527 and kit 8547 ship with NXT-G version 2.0. So NXT-G 2.0 is different from NXT 2.0. The first refers to the version of software shipped with kit 8547 while the latter is the kit 8547 itself. You cannot upgrade for free from NXT-G 1.0 or NXT-G 1.1 to NXT-G 2.0 as all this is licensed commercial software. You can buy the NXT-G 2.0 disk if you wish to upgrade.
What is LabView and what has it got to do with Mindstorms?
LabView (actually written as LabVIEW) is a visual dataflow based software development environment from National Instruments (NI) which uses a language called G. LEGO and NI have been working together since 1998 to develop a simple LabVIEW like environment for programming Mindstorms robots. The result of this partnership was initially ROBOLAB (1998) and then the NXT-G (2006) language. In other words NXT-G is a cut down version of the professional LabVIEW environment - now you know where the suffix G comes from. NI also hosted the First LEGO League competition in 2005.
The intelligent brick
The intelligent brick that came with RIS is called the RCX. The intelligent brick that comes with both the NXT and NXT 2.0 is called the NXT brick. The RCX and the NXT brick are not hardware compatible and firmware for NXT should not be installed on the RCX. The NXT brick supplied with the NXT 2.0 is the same as the original NXT brick, so those two are hardware compatible.
Firmware for the brick
The NXT brick in kit 8527 came with firmware version 1.01. LEGO later released an update to this firmware version 1.05. A more recent firmware is version 1.28 which only works with NXT-G 2.0. You can upgrade/downgrade your firmware free of charge.
Drivers for the brick
The USB and Bluetooth driver files supplied with the NXT 8527 kit were also updated from version 1.0 and version 1.02 is available. You can upgrade drivers free of charge. However these drivers only work with Windows XP and somewhat with Vista 32-bit. They don’t work at all with 64-bit Windows or Windows 7 (Don't worry, we'll sort this out in the next section).
Installing NTX-G 1.0 (kit 8527) on Windows 64-bit/7
If you try to use the NXT-G 1.0 software DVD supplied with kit 8527 on Windows Vista 64-bit or Windows 7 it will not work. The installation program will complete successfully but not install anything. You can however still install NXT-G manually.
You will need the original installation disk that came with your Mindstorms NXT kit. You cannot download that software as it is licensed for you. You can order a new disk from LEGO here.
- Remove any old LEGO software, drivers and language packs from your system first by going to Control Panel->Add/Remove Programs.
- Download and install drivers for the NXT brick for your version of Windows: 32-bit or 64-bit.
- Insert your NXT-G software disk into your computer and browse it.
- Install Bin\LEGO MINDSTORMS NXT Software\NXT_LEGO_MS\Mindstorms.msi from CD. Press OK if you see any Flash8.ocx error.
- Start Bin\Products\LEGO MINDSTORMS - English\LEGO_Eng\MidstormsEng.msi from CD. You will have to manually set the current install location correctly. It will be set to C:\ change it to C:\Program Files (x86)\LEGO Software\ on 64-bit systems and C:\Program Files\LEGO Software\ on 32-bit systems.
- If you have NXT-G 1.0, download and install the dynamic block update which should upgrade you to NXT-G version 1.1
- Download and install additional sensor blocks for NXT-G 1.1 and NXT-G 2.0.
- If you want to use the RIS sensors with the NXT-G download and install the legacy sensor blocks.
- Plug in you NXT brick via USB and verify that it is detected by Windows and works.
- Optionally you can download more NXT-G blocks developed by the NXT community here.
If you feel you need more detailed instructions read this.
Firmware upgrade
Ensure the firmware on your brick is version 1.05. Otherwise upgrade it.
If you have the NXT-G 2.0 software you can upgrade firmware to version 1.28.
What is the role of firmware?
The firmware on the NXT brick is used in conjunction with the programming environment. The firmware obtained from LEGO will work with NXT-G. If you plan to use another programming environment, they may require a completely different firmware. We will discuss alternative programming environments and firmwares in the next section. However having the LEGO firmware and the NXT-G software installed and working is useful even if you will be using a different environment as it allows you to reset your NXT brick to its default state at any time. NXT-G also provides building instructions for the robots.
Alternate ways of programming Mindstorms
If you are beginning programming, the NXT-G or ROBOLAB language supplied with Mindstorms is great to get your hands dirty. However if you want to try something else, here are some good alternatives.
There are two ways the Mindstorms robots can be programmed.
- Technique 1 (program mode): The program is downloaded and run on the Mindstorm robot.
- Programs have to be small and relatively simple.
- The robot works autonomously.
- Technique 2 (immediate mode): The robot is remote-controlled via bluetooth by a program running on your computer.
- Programs can be quite complex because complex calculations can be performed quickly on your computer and the robot only receives simple directions.
- The robot will stop working if it goes out of Bluetotoh range from the controlling computer.
- Requires an active Bluetooth connection, which will drain battery faster.
Most Mindstorms programming languages fall into one of the above categories. NXT-G programs the robot using technique 1.
Visual programming
Microsoft RDS is free, offers visual programming but uses technique 2 to control the robot. It runs on the standard LEGO firmware.
C like programming
You can use NQC for the RCX and NXC for the NXG LEGO bricks. Related to NXC is the NBC which is assembly level. These are free and work with standard LEGO firmware. However you can install a NBC enhanced firmware for more features.
A non-free but extremely popular option for C like programming is ROBOTC which requires its own custom firmware.
All these mainly use technique 1 to control the robot.
Pure C/C++
Mainly for advanced programmers the NXTGCC uses Eclipse IDE and provides the GCC toolchain for Mindstorms bricks. This is not suitable for beginners, requires good knowledge of Linux and uses custom firmware.
NXT++ uses technique 2 to control the robot from any C++ program. Requires knowledge of Visual Studio and is again only recommended for advanced programmers. It runs on the standard LEGO firmware. LesTat offers similar functionality to NXT++, but for Linux.
C# and Visual Basic
Microsoft RDS provides C# and VB programming options using technique 2. It runs on the standard LEGO firmware but is again not intended for beginners at programming.
Java
LeJOS is free and provides a Java like language for the RCX and NXG bricks. Again custom firmware is needed for this to work. LeJOS uses technique 1 for controlling the robot though it provides some examples of using technique 2 and also allows the robot to log data to a computer. This is well maintained, actively developed and Java is simpler to learn than C.
BEWARE: LEJOS OSEK is completely different beast from LEJOS, don't confuse the two.
pbLua
pbLua is a port of Lua programming language for the NXG brick. The syntax is extremely similar to C++ and it uses technique 1 to program the robot. It provides its own firmware and drivers and a very powerful API with data-logging capabilities. Try it and you might fall in love with it!

