The following instructions describe which basic software is needed or recommended to program a NXT. Of course, you are free to choose your own development environment, programming language or NXT firmware.

NXT Windows driver
Windows does not come along with drivers for the NXT Brick. Thus, you have to download, unzip (using WinZip or WinRAR) and install one of the following drivers (according to your operating system)

Bricx Command Center 3.3
The BricxCC is a comprehensive development environment for NXT with many key features:

  • Programming languages: Not eXactly C (NXC), Next Byte Codes (NBC),  on-brick programming language (NPG)
  • NXT firmwares: Standard, brickOS, pbForth, LeJOS
  • Download your own program to a NXT Brick
  • Downloading a new firmware to a NXT Brick

If you have never worked with NXT’s before and do not know which programming language to choose, we recommend you to start with NXC. It is very similar to C and provides enough flexibility for the competition tasks. You can download the BricxCC 3.3 integrated development environment from here.

After the installation, connect your NXT Brick via a USB-cable to your computer and launch the BricxCC. In the following window you have to set the port to “usb”, the brick type to “NXT” and the firmware to “Standard” (if using the recommended firmware). Then you can start developing your own program, compile it (“Compile -> Compile”) and download it to your Brick (“Compile -> Download”).

A programmers guide on NXC can be found here.

Extended Lego NXT Firmware
Some older versions of the original NXT firmware did not provide floating point data types like float. Although this has been fixed in the new firmware versions (above 1.26), we recommend to use an extend firmware version which allows direct access to elements of a multi-dimensional array (e.g. my_array[3][5] = 4; not supported by the standard firmware of Lego). The firmware can be downloaded from here.

After the file is downloaded to your computer you can use the BricxCC to download the new firmware to a NXT Brick (“Tools -> Download Firmware”).

Additional Material:

  • NXC Example program
    Download: nxc_move_square_example_program.nxc
    The example program starts with beeping three times and afterwards  the robot drives three times a square (about 50cm x 50cm). While driving, it displays the sensor values of the ultrasonic-, light-, bumper- and color sensor. When testing the program, check that the sensors and motors are connected to the correct ports.
  • MacBook keystrokes:
    -> { = alt + 7
    -> } = alt + 0
    -> [ = alt + 8
    -> ] = alt + 9
    -> right mouse click = two fingers on touch pad+ mouse key