Answers.Body: <p>There are alternate text-based programming languages for the NXT. Three of the most popular ones are <a href="http://bricxcc.sourceforge.net/nbc/">NXC/NBC</a>, <a href="http://lejos.sourceforge.net/">LeJOS NXJ</a>, and <a href="http://www.robotc.net/">RobotC</a>. There are many more, all with their pros and cons, and are much more versatile than NXT-G, even on slow computers. I my personal favorite is <a href="http://bricxcc.sourceforge.net/nbc/">NXC/NBC</a>. But really it's up to you. The best way to see what suits your needs is to look at <a href="http://www.teamhassenplug.org/NXT/NXTSoftware.html">this table</a>. It lists most of the pros and cons of the different programming languages. NOTE: it may be slightly out of date, but useful none the less.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-20T02:09:18.217Z
Answers.LastActivityDate: 2011-11-20T02:23:43.587Z
Answers.LastEditDate: 2011-11-20T02:23:43.587Z
Answers.UserDisplayName: HaydenStudios
Answers.Body: <hr>
  
  <blockquote>
    <p>Please help make this post better! This needs:</p>
    
    <ul>
    <li><strong>Clean up</strong></li>
    <li><strong>Removal of irrelevant information</strong> <s>plagiarized from</s> copied off Wikipedia</li>
    <li><strong>Links</strong></li>
    <li>[Possibly] <strong>Pictures</strong> or <strong>Code samples</strong></li>
    </ul>
  </blockquote>
  
  <hr>
  
  <hr>
  
  <h2><a href="http://service.lego.com/en-us/HelpTopics/default.aspx?questionID=2655" rel="nofollow">NXT-G</a></h2>
  
  <ul>
  <li>Graphical programming environment
  
  <ul>
  <li>Uses Blocks</li>
  <li>Based on LabView</li>
  <li>Parallel "sequence beams" are actually parallel threads</li>
  </ul></li>
  <li>Comes bundled with the NXT</li>
  <li>The language supports virtual instruments for all LEGO branded and most 3rd party sensors/components.</li>
  <li>Community support is significant, for example, <a href="http://www.brickshelf.com/cgi-bin/gallery.cgi?f=191310" rel="nofollow">Brickshelf</a>.</li>
  </ul>
  
  <h2><a href="http://enchanting.robotclub.ab.ca/tiki-index.php" rel="nofollow">Enchanting</a></h2>
  
  <ul>
  <li>Graphical programming environment
  
  <ul>
  <li>Based on MIT's Scratch</li>
  <li>Drag and drop</li>
  </ul></li>
  <li>Based on LeJOS VM.</li>
  <li>Fast.</li>
  </ul>
  
  <h2><a href="http://robotaryapp.com" rel="nofollow">Robotary / Swift</a></h2>
  
  <ul>
  <li>Mac IDE and robotics studio based on the Swift programming language</li>
  <li>IDE features
  
  <ul>
  <li>context-aware code completions</li>
  <li>syntax highlighting</li>
  <li>LLDB-based debugger</li>
  <li>visual debug gauges</li>
  <li>built-in documentation viewer</li>
  <li>various examples</li>
  <li>Bluetooth and USB support</li>
  </ul></li>
  </ul>
  
  <hr>
  
  <blockquote>
    <h1>HELP!</h1>
    
    <p>The following section needs serious editing!</p>
  </blockquote>
  
  <hr>
  
  <h2>C# with Microsoft Robotics Developer Studio</h2>
  
  <ul>
  <li>Free tools Visual Studio Express and the Robotics Developer Studio allow you to program using the C# language.</li>
  <li>Sample Project on <a href="http://channel9.msdn.com/coding4fun/articles/Microsoft-Robotics-Studio-and-Lego-Mindstorms-NXT" rel="nofollow">coding4fun</a></li>
  <li>Other languages are supported as well, including IronPython and VB.NET</li>
  </ul>
  
  <h1>BricxCC, Next Byte Codes, Not eXactly C</h1>
  
  <hr>
  
  <h2><a href="http://bricxcc.sourceforge.net/" rel="nofollow">Bricx Command Center (BricxCC)</a></h2>
  
  <ul>
  <li>IDE used to write, compile, and edit NBC and NXC programs for the NXT.</li>
  <li>Can flash different firmwares to NXT.</li>
  <li>BricxCC has many utilities, such as:
  
  <ul>
  <li>NeXTExplorer (upload/download files, defragment the NXT, use file hex viewer)</li>
  <li>NeXTScreen (view what's on the NXT's LCD display, and capture images and video)</li>
  </ul></li>
  </ul>
  
  <h2><a href="http://bricxcc.sourceforge.net/nbc/" rel="nofollow">Next Byte Codes (NBC)</a></h2>
  
  <ul>
  <li>Open Source</li>
  <li>Assembly language syntax</li>
  <li>BricxCC can decompile standard NXT executables (.rxe) to NBC</li>
  </ul>
  
  <h2><a href="http://bricxcc.sourceforge.net/nxc/" rel="nofollow">Not eXactly C (NXC)</a></h2>
  
  <ul>
  <li>Open Source.</li>
  <li>Text based language.</li>
  <li>Based on C.</li>
  <li>Uses NBC as assembly language.</li>
  <li>One of the most popular third-party programming languages for the NXT.</li>
  </ul>
  
  <hr>
  
  <h2><a href="http://www.legoeducation.us/store/detail.aspx?CategoryID=177&amp;by=9&amp;ID=1273&amp;c=1&amp;t=0&amp;l=0" rel="nofollow">Robolab</a></h2>
  
  <ul>
  <li>Older programming environment; originally used for RCX bricks.</li>
  <li>Version 2.9 has been updated so that it can be used to program the NXT brick</li>
  <li>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.</li>
  </ul>
  
  <h2>ROBOTC</h2>
  
  <ul>
  <li>Developed by the <a href="http://www.education.rec.ri.cmu.edu" rel="nofollow">Carnegie Mellon Robotic's Academy</a></li>
  <li>Based on C</li>
  <li>Used on VEX, VEX Cortex, FIRST Tech Challenge, and Lego Mindstorms NXT.</li>
  <li>Custom firmware for very fast program execution.</li>
  <li>Compresses files to increase available space.</li>
  </ul>
  
  <h2>NXTGCC</h2>
  
  <ul>
  <li>GCC toolchain.</li>
  <li>For programming the NXT firmware in C</li>
  </ul>
  
  <h2><a href="http://lejos.sourceforge.net/index.php" rel="nofollow">leJOS NXJ</a></h2>
  
  <ul>
  <li>High level language</li>
  <li>Open source</li>
  <li>Based on Java</li>
  <li>Uses custom firmware</li>
  </ul>
  
  <h2><a href="http://lejos-osek.sourceforge.net/index.php" rel="nofollow">nxtOSEK</a></h2>
  
  <ul>
  <li>C/C++</li>
  <li>Requires custom firmware</li>
  </ul>
  
  <h2><a href="http://www.teamhassenplug.org/NXT/ICON/" rel="nofollow">ICON</a></h2>
  
  <ul>
  <li>To write files on the NXT itself</li>
  </ul>
  
  <hr>
  
  <h1>MATLAB and Simulink</h1>
  
  <h2>MATLAB</h2>
  
  <ul>
  <li>High-level programming language.</li>
  <li>For numerical computing, data acquisition and analysis.</li>
  <li>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 free and open source <a href="http://www.mindstorms.rwth-aachen.de" rel="nofollow">RWTH - Mindstorms NXT Toolbox</a>.</li>
  </ul>
  
  <h2>Simulink</h2>
  
  <ul>
  <li>MATLAB-based environment for modeling and simulating dynamic systems.</li>
  <li>Using Simulink, a user can design control algorithms, automatically generate C code for those algorithms, and download the compiled code onto the LEGO NXT.</li>
  </ul>
  
  <p>MATLAB and Simulink code for LEGO MINDSTORMS NXT programming is freely available.</p>
  
  <hr>
  
  <h2><a href="http://www.hempeldesigngroup.com/lego/pbLua/pbLua" rel="nofollow">Lua</a></h2>
  
  <ul>
  <li>Port of the Lua</li>
  <li>General purpose scripting language</li>
  </ul>
  
  <h2>Ada</h2>
  
  <ul>
  <li>A [<a href="http://libre.adacore.com/libre/tools/mindstorms/" rel="nofollow">http://libre.adacore.com/libre/tools/mindstorms/</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.</li>
  </ul>
  
  <h2>URBI</h2>
  
  <ul>
  <li>[[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.[<a href="http://www.gostai.com/nxt" rel="nofollow">http://www.gostai.com/nxt</a> URBI NXT Page]</li>
  </ul>
  
  <h2>FLL NXT Navigation</h2>
  
  <ul>
  <li>[<a href="http://fllnxtnavigation.codeplex.com/" rel="nofollow">http://fllnxtnavigation.codeplex.com/</a> 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.</li>
  </ul>
  
  <h2><a href="https://github.com/zuk/ruby-nxt%20ruby-nxt" rel="nofollow">ruby-nxt</a></h2>
  
  <ul>
  <li>Library to program the NXT for the Ruby programming language.</li>
  <li>Code is not compiled to a binary file; it is directly transmitted to the NXT via a Bluetooth connection.</li>
  </ul>
  
  <h2><a href="http://hackage.haskell.org/package/NXT" rel="nofollow">Robotics.NXT</a></h2>
  
  <ul>
  <li>Haskellinterface to NXT over Bluetoooth.</li>
  <li>Supports direct commands, messages and many sensors (also unofficial).</li>
  <li>It has also support for a simple message-based control of a NXT brick via remotely executed program (basic NXC code included).</li>
  </ul>
  
  <h2><a href="http://code.google.com/p/libnxt/LibNXT" rel="nofollow">LibNXT</a></h2>
  
  <ul>
  <li>utility library for talking to the LEGO Mindstorms NXT intelligent brick at a relatively low level.</li>
  <li>is targeted mainly at the platforms that the official Lego Minstorms NXT software overlooks, namely Linux and other unices.</li>
  <li>It will work on any POSIX-compliant operating system where libusb 0.1 <a href="http://libusb.sf.net/" rel="nofollow">http://libusb.sf.net/</a> is supported.</li>
  <li>Windows support is also possible with the win32 port of libusb.</li>
  </ul>
  
  <h2><a href="http://code.google.com/p/pynxc/" rel="nofollow">PyNXC</a></h2>
  
  <ul>
  <li>Translates Python code into NXC (see above) code, to compile and download to LEGO MINDSTORMS Robots.</li>
  </ul>
  
  <hr>
  
  <p>(<a href="http://en.wikipedia.org/wiki/Lego_Mindstorms#Programming_languages_2" rel="nofollow">Some</a> <a href="http://en.wikipedia.org/wiki/Lego_Mindstorms_NXT#Programming" rel="nofollow">content</a> from Wikipedia. Licensed under CC-Wiki, obviously.)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-23T01:33:15.757Z
Answers.LastActivityDate: 2016-09-01T14:17:07.287Z
Answers.LastEditDate: 2016-09-01T14:17:07.287Z
Answers.UserDisplayName: Mateen Ulhaq
Answers.Body: <p>You can program the raw hardware:</p>
  
  <p>The main microcontroller in the NXT is an Atmel <a href="http://www.atmel.com/dyn/products/product_card.asp?part_id=3524" rel="noreferrer">AT91SAM7S256</a> (<a href="http://www.atmel.com/dyn/resources/prod_documents/doc6175.pdf" rel="noreferrer">data sheet</a>), which uses the ARM7TDMI core from ARM. This core is supported by gcc, so you can use GNU tools to program it in Assembly/C/C++.</p>
  
  <p>You can build a firmware for the AT91SAM7S256 and load it via USB, after putting the controller in SAM-BA mode by a long press on the reset button.</p>
  
  <p>There is also a smaller ATmega48 controller in the NXT, but it is not intended to be reprogrammed.</p>
  
  <p>LEGO provides a Hardware Developer Kit among their <a href="http://mindstorms.lego.com/en-us/support/files/default.aspx#Advanced" rel="noreferrer">support files</a>. It contains schematics and descriptions of the sensors and motors, so that you know how the microcontroller is connected to the NXTs ports.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-21T20:11:43.850Z
Answers.LastActivityDate: 2011-11-21T20:11:43.850Z
Answers.UserDisplayName: starblue
Answers.Body: <p>I started coding using NXT software and later EV3 and lately I have switched to java using leJOS. EV3 software ( and NXT ) is great for quickly hacking your ideas but when things get ugly the graphical language doesn't help at all.</p>
  
  <p>Just watch what I needed to do to create a playable version of Pong for one player at <a href="http://thetechnicgear.com/2014/03/playable-pong-lego-mindstorms-ev3/" rel="nofollow">http://thetechnicgear.com/2014/03/playable-pong-lego-mindstorms-ev3/</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-02T18:27:26.347Z
Answers.LastActivityDate: 2014-06-02T18:27:26.347Z
Answers.UserDisplayName: Miguel
Answers.Body: <p>You can use a python module called NXT-Python. If you know how to use python it will be very useful tool.</p>
  
  <p>You can find it <a href="https://github.com/Eelviny/nxt-python.git" rel="nofollow noreferrer">on GitHub</a>. You can also use the package manager on some Linux distributions:</p>
  
  <pre><code>apt install python-nxt
  </code></pre>
  
  <p>Here you have some tutorials:</p>
  
  <ul>
  <li><p><a href="http://machineawakening.blogspot.com.es/2011/01/python-api-for-lego-mindstorms-nxt.html" rel="nofollow noreferrer">Python-nxt tutorial (EN)</a></p></li>
  <li><p><a href="https://www.fing.edu.uy/inco/cursos/fpr/wiki/index.php/API_nxt-python" rel="nofollow noreferrer">Python-nxt tutorial (SP)</a></p></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-25T12:39:13.813Z
Answers.LastActivityDate: 2017-07-25T18:34:51.453Z
Answers.LastEditDate: 2017-07-25T18:34:51.453Z
Answers.UserDisplayName: RoberLR
Answers.Body: <p>You can program the lego NXT in any language you wish!  What is really the question is if you want the mindstorms brick to perform the decision making, or if you want some other device to do that for you.  This works in two ways:</p>
  
  <p>You download a program onto the NXT that it can run in its native format.  Based on sensor input and the program which you've written, the NXT can operate by itself.  This is how the mindstorms modules are primarely designed to operate out of the box - where you use their "visual" programming interface to create a program and then download it to the NXT.</p>
  
  <p>As listed above, there are various other types of programming languages and interfaces you can use to write programs for the NXT.  Eventually they require you to download them to the NXT - which will again be performing all the necessary calculations to run the program on-bard of the brick.  These tend to offer you more control over your program however ultimately rely on the computing power available on the NXT.</p>
  
  <p>The second scenario is to use the NXT as sort of a "slave" to another device with more computing power.  This device - such as a PC or MAC, can be used to send down real-time direct commands to the NXT device to operate on.  Based on feedback transfered back to the host computer, you can send down other commands.  Using this method, you can use any programming language you are comfortable with - and simply use the NXT as a "dumb" device.  This offers you the most verstility, and you can use virtually any programming language you are comfortable with.</p>
  
  <p>What's nice about the NXT is that it allows you to use such a wide array of different techniques to control it - which makes it a great platform.  One great walk-through of sending these direct commands over bluetooth to the NXT can be found here:
  <a href="http://www.robotappstore.com/Knowledge-Base/Programming-LEGO-NXT-Mindstorms/92.html" rel="nofollow">http://www.robotappstore.com/Knowledge-Base/Programming-LEGO-NXT-Mindstorms/92.html</a>
  I would recomend checking it out, since its a great introduction to getting started.  If your computer supports bluetooth, you can easily download realterm (free) and get your robotic project working quickly!</p>
  
  <p>I will admit that sending these direct commands to the NXT is a bit more advanced than say the type of visual programming used with the supplied Lego software, but it will allow you to use any language you wish, and with slight modification you can use your code for un-related projects too!</p>
  
  <p>Hope this helps!
  -Ryan</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-08-22T07:04:12.653Z
Answers.LastActivityDate: 2012-08-22T07:04:12.653Z
Answers.UserDisplayName: Robotman
Answers.Body: <p>The programming interface used by LEGO creates programs which make use of the standard firmware, that is, the one provided by LEGO.</p>
  
  <p>If you look at <a href="http://www.teamhassenplug.org/NXT/NXTSoftware.html" rel="noreferrer">alternatives</a> (see also <a href="https://bricks.stackexchange.com/q/680">this answer</a> for more information), you'll notice that quite a lot of them use the same firmware.</p>
  
  <p>This means that the programs they produce use the same language which is interpreted by the standard firmware. One advantage is that you can have a mix of programs on the same NXT brick and it doesn't matter with what they've been originally written.</p>
  
  <p>If you're interested to know more about the standard firmware and how to program it, you can download the <a href="http://mindstorms.lego.com/en-us/support/files/default.aspx" rel="noreferrer">Mindstorms Software Developer Kit</a>. One of the interesting aspects of it is that you don't always need to create programs but you can send direct commands to the NXT as well - meaning you actual programming logic can sit on another connected device (PC, smartphone,...).</p>
  
  <p>Others alternate languages use a different firwmare altogether, which means you can't mix languages at all. But if it uses a language you're more familiar with, it may be worth trying. (You can always revert to the standard firmware anyway.)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-08-23T18:30:01.903Z
Answers.Text: As an example of the programming logic running on another device, my [nxt floppy-disk machine](https://retracile.net/blog/2011/06/05/15.30) used Python on a laptop to control an NXT running the standard firmware.
Answers.UserDisplayName: retracile
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-11-14T21:30:00.143Z
Answers.Text: [Not eXactly C](http://bricxcc.sourceforge.net/nbc) is a good language to learn when transitioning from LEGO's NXT-G to text-based programming.
Answers.UserDisplayName: shea
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-20T10:00:12.370Z
Answers.LastActivityDate: 2011-11-20T10:00:12.370Z
Answers.LastEditDate: 2017-04-13T12:47:56.390Z
Answers.UserDisplayName: Joubarc
Body: <p>I'm curious to know if there is any way to program the NXT other than the provided software.</p>
  
  <p>I don't necessarily have any issue with the software.</p>
  
  <p>Does the program created by the software translate into an actual programming/scripting language? If so is that language proprietary to Lego or is it a common programming language?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2012-10-06T20:17:45.283Z
Comments.Text: If you're into robotics, why not join the [Robotics Proposal](http://area51.stackexchange.com/proposals/40020/robotics)?
Comments.UserDisplayName: Rocketmagnet
Tags: <mindstorms><nxt><programming>
Title: Is there any other way to program the Lego Mindstorms NXT other than the provided software?
UserDisplayName: Jasarien
ThreadText: # Is there any other way to program the Lego Mindstorms NXT other than the provided software?
  
  (Asked by: username_0 on 2011-11-20)
  
  I'm curious to know if there is any way to program the NXT other than the provided software.
  
  I don't necessarily have any issue with the software.
  
  Does the program created by the software translate into an actual programming/scripting language? If so is that language proprietary to Lego or is it a common programming language?
  
  **Tags:** mindstorms, nxt, programming
  
  > **Comments:**
  > **username_1**: If you're into robotics, why not join the [Robotics Proposal](http://area51.stackexchange.com/proposals/40020/robotics)?  
  
  ---
  
  ## 7 answers
  
  ### Answer by username_8 on 2011-11-20. Score: 24 | Accepted answer
  
  The programming interface used by LEGO creates programs which make use of the standard firmware, that is, the one provided by LEGO.
  
  If you look at [alternatives](http://www.teamhassenplug.org/NXT/NXTSoftware.html) (see also [this answer](https://bricks.stackexchange.com/q/680) for more information), you'll notice that quite a lot of them use the same firmware.
  
  This means that the programs they produce use the same language which is interpreted by the standard firmware. One advantage is that you can have a mix of programs on the same NXT brick and it doesn't matter with what they've been originally written.
  
  If you're interested to know more about the standard firmware and how to program it, you can download the [Mindstorms Software Developer Kit](http://mindstorms.lego.com/en-us/support/files/default.aspx). One of the interesting aspects of it is that you don't always need to create programs but you can send direct commands to the NXT as well - meaning you actual programming logic can sit on another connected device (PC, smartphone,...).
  
  Others alternate languages use a different firwmare altogether, which means you can't mix languages at all. But if it uses a language you're more familiar with, it may be worth trying. (You can always revert to the standard firmware anyway.)
  
  > **Comments:**
  > **username_9**: As an example of the programming logic running on another device, my [nxt floppy-disk machine](https://username_9.net/blog/2011/06/05/15.30) used Python on a laptop to control an NXT running the standard firmware.  
  > **username_10**: [Not eXactly C](http://bricxcc.sourceforge.net/nbc) is a good language to learn when transitioning from LEGO's NXT-G to text-based programming.  
  
  ---
  
  ### Answer by username_2 on 2011-11-20. Score: 14
  
  There are alternate text-based programming languages for the NXT. Three of the most popular ones are [NXC/NBC](http://bricxcc.sourceforge.net/nbc/), [LeJOS NXJ](http://lejos.sourceforge.net/), and [RobotC](http://www.robotc.net/). There are many more, all with their pros and cons, and are much more versatile than NXT-G, even on slow computers. I my personal favorite is [NXC/NBC](http://bricxcc.sourceforge.net/nbc/). But really it's up to you. The best way to see what suits your needs is to look at [this table](http://www.teamhassenplug.org/NXT/NXTSoftware.html). It lists most of the pros and cons of the different programming languages. NOTE: it may be slightly out of date, but useful none the less.
  
  
  ---
  
  ### Answer by username_3 on 2011-11-23. Score: 9
  
  ---
  
  > Please help make this post better! This needs:
  >
  > * **Clean up**
  > * **Removal of irrelevant information** ~~plagiarized from~~ copied off Wikipedia
  > * **Links**
  > * [Possibly] **Pictures** or **Code samples**
  
  ---
  
  ---
  
  ## [NXT-G](http://service.lego.com/en-us/HelpTopics/default.aspx?questionID=2655)
  
  * Graphical programming environment
    + Uses Blocks
    + Based on LabView
    + Parallel "sequence beams" are actually parallel threads
  * Comes bundled with the NXT
  * The language supports virtual instruments for all LEGO branded and most 3rd party sensors/components.
  * Community support is significant, for example, [Brickshelf](http://www.brickshelf.com/cgi-bin/gallery.cgi?f=191310).
  
  ## [Enchanting](http://enchanting.robotclub.ab.ca/tiki-index.php)
  
  * Graphical programming environment
    + Based on MIT's Scratch
    + Drag and drop
  * Based on LeJOS VM.
  * Fast.
  
  ## [Robotary / Swift](http://robotaryapp.com)
  
  * Mac IDE and robotics studio based on the Swift programming language
  * IDE features
    + context-aware code completions
    + syntax highlighting
    + LLDB-based debugger
    + visual debug gauges
    + built-in documentation viewer
    + various examples
    + Bluetooth and USB support
  
  ---
  
  > # HELP!
  >
  > The following section needs serious editing!
  
  ---
  
  ## C# with Microsoft Robotics Developer Studio
  
  * Free tools Visual Studio Express and the Robotics Developer Studio allow you to program using the C# language.
  * Sample Project on [coding4fun](http://channel9.msdn.com/coding4fun/articles/Microsoft-Robotics-Studio-and-Lego-Mindstorms-NXT)
  * Other languages are supported as well, including IronPython and VB.NET
  
  # BricxCC, Next Byte Codes, Not eXactly C
  
  ---
  
  ## [Bricx Command Center (BricxCC)](http://bricxcc.sourceforge.net/)
  
  * IDE used to write, compile, and edit NBC and NXC programs for the NXT.
  * Can flash different firmwares to NXT.
  * 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 display, and capture images and video)
  
  ## [Next Byte Codes (NBC)](http://bricxcc.sourceforge.net/nbc/)
  
  * Open Source
  * Assembly language syntax
  * BricxCC can decompile standard NXT executables (.rxe) to NBC
  
  ## [Not eXactly C (NXC)](http://bricxcc.sourceforge.net/nxc/)
  
  * Open Source.
  * Text based language.
  * Based on C.
  * Uses NBC as assembly language.
  * One of the most popular third-party programming languages for the NXT.
  
  ---
  
  ## [Robolab](http://www.legoeducation.us/store/detail.aspx?CategoryID=177&by=9&ID=1273&c=1&t=0&l=0)
  
  * Older programming environment; originally used for RCX bricks.
  * 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.
  
  ## ROBOTC
  
  * Developed by the [Carnegie Mellon Robotic's Academy](http://www.education.rec.ri.cmu.edu)
  * Based on C
  * Used on VEX, VEX Cortex, FIRST Tech Challenge, and Lego Mindstorms NXT.
  * Custom firmware for very fast program execution.
  * Compresses files to increase available space.
  
  ## NXTGCC
  
  * GCC toolchain.
  * For programming the NXT firmware in C
  
  ## [leJOS NXJ](http://lejos.sourceforge.net/index.php)
  
  * High level language
  * Open source
  * Based on Java
  * Uses custom firmware
  
  ## [nxtOSEK](http://lejos-osek.sourceforge.net/index.php)
  
  * C/C++
  * Requires custom firmware
  
  ## [ICON](http://www.teamhassenplug.org/NXT/ICON/)
  
  * To write files on the NXT itself
  
  ---
  
  # MATLAB and Simulink
  
  ## MATLAB
  
  * 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 free and open source [RWTH - Mindstorms NXT Toolbox](http://www.mindstorms.rwth-aachen.de).
  
  ## Simulink
  
  * MATLAB-based environment for modeling and simulating dynamic systems.
  * Using Simulink, a user can design control algorithms, automatically generate C code for those algorithms, and download the compiled code onto the LEGO NXT.
  
  MATLAB and Simulink code for LEGO MINDSTORMS NXT programming is freely available.
  
  ---
  
  ## [Lua](http://www.hempeldesigngroup.com/lego/pbLua/pbLua)
  
  * Port of the Lua
  * General purpose scripting language
  
  ## Ada
  
  * A [<http://libre.adacore.com/libre/tools/mindstorms/> 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
  
  * [[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.[<http://www.gostai.com/nxt> URBI NXT Page]
  
  ## FLL NXT Navigation
  
  * [<http://fllnxtnavigation.codeplex.com/> 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.
  
  ## [ruby-nxt](https://github.com/zuk/ruby-nxt%20ruby-nxt)
  
  * Library to program the NXT for the Ruby programming language.
  * Code is not compiled to a binary file; it is directly transmitted to the NXT via a Bluetooth connection.
  
  ## [Robotics.NXT](http://hackage.haskell.org/package/NXT)
  
  * Haskellinterface to NXT over Bluetoooth.
  * 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](http://code.google.com/p/libnxt/LibNXT)
  
  * utility library for talking to the LEGO Mindstorms NXT intelligent brick at a relatively low level.
  * is targeted mainly at the platforms that the official Lego Minstorms 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.
  
  ## [PyNXC](http://code.google.com/p/pynxc/)
  
  * Translates Python code into NXC (see above) code, to compile and download to LEGO MINDSTORMS Robots.
  
  ---
  
  ([Some](http://en.wikipedia.org/wiki/Lego_Mindstorms#Programming_languages_2) [content](http://en.wikipedia.org/wiki/Lego_Mindstorms_NXT#Programming) from Wikipedia. Licensed under CC-Wiki, obviously.)
  
  
  ---
  
  ### Answer by username_4 on 2011-11-21. Score: 6
  
  You can program the raw hardware:
  
  The main microcontroller in the NXT is an Atmel [AT91SAM7S256](http://www.atmel.com/dyn/products/product_card.asp?part_id=3524) ([data sheet](http://www.atmel.com/dyn/resources/prod_documents/doc6175.pdf)), which uses the ARM7TDMI core from ARM. This core is supported by gcc, so you can use GNU tools to program it in Assembly/C/C++.
  
  You can build a firmware for the AT91SAM7S256 and load it via USB, after putting the controller in SAM-BA mode by a long press on the reset button.
  
  There is also a smaller ATmega48 controller in the NXT, but it is not intended to be reprogrammed.
  
  LEGO provides a Hardware Developer Kit among their [support files](http://mindstorms.lego.com/en-us/support/files/default.aspx#Advanced). It contains schematics and descriptions of the sensors and motors, so that you know how the microcontroller is connected to the NXTs ports.
  
  
  ---
  
  ### Answer by username_5 on 2014-06-02. Score: 4
  
  I started coding using NXT software and later EV3 and lately I have switched to java using leJOS. EV3 software ( and NXT ) is great for quickly hacking your ideas but when things get ugly the graphical language doesn't help at all.
  
  Just watch what I needed to do to create a playable version of Pong for one player at <http://thetechnicgear.com/2014/03/playable-pong-lego-mindstorms-ev3/>
  
  
  ---
  
  ### Answer by username_6 on 2017-07-25. Score: 2
  
  You can use a python module called NXT-Python. If you know how to use python it will be very useful tool.
  
  You can find it [on GitHub](https://github.com/Eelviny/nxt-python.git). You can also use the package manager on some Linux distributions:
  
  ```
  apt install python-nxt
  
  ```
  
  Here you have some tutorials:
  
  * [Python-nxt tutorial (EN)](http://machineawakening.blogspot.com.es/2011/01/python-api-for-lego-mindstorms-nxt.html)
  * [Python-nxt tutorial (SP)](https://www.fing.edu.uy/inco/cursos/fpr/wiki/index.php/API_nxt-python)
  
  
  ---
  
  ### Answer by username_7 on 2012-08-22. Score: 2
  
  You can program the lego NXT in any language you wish! What is really the question is if you want the mindstorms brick to perform the decision making, or if you want some other device to do that for you. This works in two ways:
  
  You download a program onto the NXT that it can run in its native format. Based on sensor input and the program which you've written, the NXT can operate by itself. This is how the mindstorms modules are primarely designed to operate out of the box - where you use their "visual" programming interface to create a program and then download it to the NXT.
  
  As listed above, there are various other types of programming languages and interfaces you can use to write programs for the NXT. Eventually they require you to download them to the NXT - which will again be performing all the necessary calculations to run the program on-bard of the brick. These tend to offer you more control over your program however ultimately rely on the computing power available on the NXT.
  
  The second scenario is to use the NXT as sort of a "slave" to another device with more computing power. This device - such as a PC or MAC, can be used to send down real-time direct commands to the NXT device to operate on. Based on feedback transfered back to the host computer, you can send down other commands. Using this method, you can use any programming language you are comfortable with - and simply use the NXT as a "dumb" device. This offers you the most verstility, and you can use virtually any programming language you are comfortable with.
  
  What's nice about the NXT is that it allows you to use such a wide array of different techniques to control it - which makes it a great platform. One great walk-through of sending these direct commands over bluetooth to the NXT can be found here:
  <http://www.robotappstore.com/Knowledge-Base/Programming-LEGO-NXT-Mindstorms/92.html>
  I would recomend checking it out, since its a great introduction to getting started. If your computer supports bluetooth, you can easily download realterm (free) and get your robotic project working quickly!
  
  I will admit that sending these direct commands to the NXT is a bit more advanced than say the type of visual programming used with the supplied Lego software, but it will allow you to use any language you wish, and with slight modification you can use your code for un-related projects too!
  
  Hope this helps!
  -Ryan
  
  
  ---
  
  