Free Lego Mindstorms NXT Compilers and Programming Languages

C, C++, Java, etc, for the Lego NXT Robot Brick

Free Lego Mindstorms NXT Compilers and Programming Languages

The Lego Mindstorms NXT is a robotics set from Lego that comes with a programmable 32-bit RISC ARM CPU, Lego blocks that you can use to build a robot, servo motors and sensors (sound sensor, ultrasonic sensor, light sensor, touch sensor), and a visual programming environment called the NXT-G. The NXT-G graphical programming environment provided with the robotics kit is usable and even child-friendly in that it uses pictorial blocks and controls which you can adjust visually to control the robot. However, it does have its limitations, among which is its cumbersome interface for using variables. For those who want something more powerful or versatile to program the robot, or who prefer to use a more traditional programming language or environment, this page of free Lego Mindstorms NXT programming languages, compilers and development environments is for you.

Note: some of the programming languages may require that you upload a different firmware (than that provided by Lego with your NXT brick) to provide the necessary facilities, while others will work with the default NXT firmware. You may want to read the warranty that comes with your robotics set carefully before you upload a different firmware because it's possible that uploading third party firmware to the brick invalidates your warranty. (It's probably not going to stop you anyway, but it's good to know before you do it.)

Related Pages

Free Lego Mindstorms NXT Compilers and Programming Languages

Next Byte Codes (NBC) and Not eXactly C (NXC) [Assembler and C] (Windows, Mac OS X, Linux, FreeBSD)

Next Byte Codes, or NBC, is a pseudo assembly language for the NXT robotics computer. Not eXactly C, or NXC, has similarities with the C programming language and is built on top of NBC. You do not have to install a new firmware in your NXT brick to use the language. Compiled programs using either of these languages will work with the existing Lego firmware. They however have an (optional) "enhanced firmware" that provides additional facilities (like multi-dimensional arrays and native shift and wait operations) to your programs over and above what is available from the Lego firmware. NBC and NXC are open source. Also available is the Bricx Command Center (BricxCC), an integrated programming environment for use with NBC, NXC and others. Platforms supported include Windows, Mac OS X, Linux and FreeBSD.

nxtOSEK (formerly LeJOS OSEK) [Ansi C/C++] (Windows)

This is an open source firmware for the Lego Mindstorms NXT brick that provides a real-time operating system. You can write ANSI C/C++ programs that access the NXT hardware (sensors, servo motors, etc) with the C and C++ API, compile it with the GNU C/C++ Compiler (GCC) (ARM version) to native binary code (yes, native ARM7 code, not interpreted code like many/most of the others), and transfer it to your NXT brick. It requires the standard Lego NXT firmware as well as an enhanced NXT standard firmware. It does not come with any IDE (only command line tools), but you can use any Java IDE, such as Eclipse, with it. At present, only Windows XP is officially supported.

LeJOS: Java for Lego Mindstorms [Java] (Windows, Linux, Mac OS X)

LeJOS, probably a play of words on "Lego" (with the "g" replaced by "J" for "Java"), provides a Java virtual machine for the NXT brick as well as the older Lego RCX brick, allowing you to use the Java programming language for your NXT programs. It even has an Eclipse plugin so that you can work on your programs from within the Eclipse IDE. From there, you can upload the LeJOS firmware as well as write, compile and upload your NXJ (or Java for NXT) programs. LeJOS NXJ is open source and is licensed under the Mozilla Public License (MPL).

Related Pages

Can't Find What You're Looking For?

Search the site using Google.

Newest Pages

Popular Pages

How to Link to This Page

It will appear on your page as:

Free Lego Mindstorms NXT Compilers and Programming Languages Free Webmaster Tutorials, Scripts and Articles Free How-To Guides Free Programmers, Webmasters and Security Resources
If you find this site useful, please link to us.