Answers.Body: <p>I've had great success with <a href="http://bricxcc.sourceforge.net/" rel="nofollow noreferrer">Bricx Command Center or BricxCC</a> (as mentioned in <a href="https://bricks.stackexchange.com/questions/679/is-there-any-other-way-to-program-the-lego-mindstorms-nxt-other-than-the-provide">this post</a>) on my NXT using NXC (which is easy to pick-up when you already have a C/C++ foundation like you've mentioned).</p>
  
  <p>Installation, using the supplied drivers and connecting via USB is a breeze :)</p>
  
  <p>Hope this helps!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-03T09:58:44.263Z
Answers.LastActivityDate: 2018-07-03T09:58:44.263Z
Answers.UserDisplayName: Nita
Answers.Body: <p>In my experience, most 3rd-party firmware can be flashed to the NXT brick using the standard NXT-G software "Firmware Update Tool." As others have mentioned, BricxCC with NXC is also a great option.
  And if you're having trouble with the Python implementation, it's definitely worth checking out <a href="http://www.lejos.org" rel="nofollow noreferrer">LeJOS</a> (Java for Mindstorms). While Java may not be the usual choice for robotics, LeJOS runs fast and is easily the most feature-rich of any language available for the NXT.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-12T18:04:45.047Z
Answers.LastActivityDate: 2018-07-12T18:04:45.047Z
Answers.UserDisplayName: MindS1
Body: <p>I have a basic LEGO Mindstorms kit which I wanted to use for testing a very simple object-avoidance project. </p>
  
  <p>I am trying to find a relatively simple way to flash the brick and upload scripts to it for executing, preferably something simple like Python or C++. I've been looking around the Internet for a few weeks now and have found almost nothing. </p>
  
  <p>I see <a href="https://www.damonkohler.com/2011/01/flash-nxt-ubuntu.html" rel="nofollow noreferrer">some instructions</a> how to flash the brick with some generic firmware, but no more information how to get to the point of programming it the way I need. I see the most popular source for programming the NXT in Python is <a href="https://github.com/Eelviny/nxt-python" rel="nofollow noreferrer">NXT-Python</a>. However, there is 1) no documentation 2) outstanding bugs on the ultrasonic sensor that has not been addressed since 2015 and 3) only executes the program on the PC and sends command to the brick, rather than uploading the program to the brick. </p>
  
  <p>I see that NXT is usually programmed in the language NXC, which fortunately has an extensive <a href="http://bricxcc.sourceforge.net/nbc/nxcdoc/NXC_Guide.pdf" rel="nofollow noreferrer">documentation in PDF form</a>. However, this language (based in C) seems like an entire beast of its own, and idk if I would have the time or patience to master an entirely new language just to program for this one small project. Furthermore, the GUI for NXC seems to be only for windows, but I'm using Ubuntu. </p>
  
  <p>NXC seems to be translatable from Python using the <a href="https://code.google.com/archive/p/pynxc/" rel="nofollow noreferrer">PyNXC library</a>. However, it also doesn't seem to have any documentation except a couple of examples, and otherwise just pointing to the NXC tutorials. </p>
  
  <p>Anything I am missing here, or is that the entire length and breadth of programming the NXT? I have a feeling there has got to be something more straight forward, as other people online talk about programming the NXT in python as if it was easy. </p>
  
  <p>Thanks</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-26T08:30:31.063Z
Comments.Text: Have you checked out the answers to [this question](https://bricks.stackexchange.com/q/679/56) and [this detailed page](http://www.teamhassenplug.org/NXT/NXTSoftware.html)? I think the fundamental issue is the Python limitation. RobotC has three different flavours ranging from Graphical, through [Natural Language](http://www.robotc.net/NaturalLanguage/) down to a more C-like version
Comments.UserDisplayName: Zhaph - Ben Duguid
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-26T14:55:29.640Z
Comments.Text: The limitation is not really Python, but just some existing, usable language. I did see that chart before, and my issue with it is that the only languages it mentions are Assembly, C, and Java. I could try to install the Java version, I guess, because I don't see myself getting very far programming in either Assembly or C. Even so, Java is not exactly the kind of language meant to be used for a Robot, so idk why I should be forced to use that. As for the rest, I don't want to have to work with a completely new language from scratch, even if it is "C-like".
Comments.UserDisplayName: Nathan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-26T15:00:13.927Z
Comments.Text: I can program a Raspberry Pi in any language I want. How much more complicated can a piece of LEGO be?
Comments.UserDisplayName: Nathan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-26T15:11:12.320Z
Comments.Text: I think it's more that the NXT is much simpler than the Raspberry PI, and so can't cope with the runtimes required to support higher level languages - Assembly and C are both "low level" languages, keeping you very close to the hardware, while Java is at least compiled to byte-code that then runs in a virtual machine - Python by contrast is an interpreted language, so it needs a runtime interpreter, which in turn requires something to host it.
Comments.UserDisplayName: Zhaph - Ben Duguid
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-26T15:22:07.350Z
Comments.Text: The NXT has a 32bit, 60MHz ARM processor, 256KB of FLASH memory and 64KB of RAM. The PI Zero has a 1GHz processor, 512MB RAM, while the PI 3 B+ has a 64bit, 1.4GHz processor, 1GB RAM, etc.
Comments.UserDisplayName: Zhaph - Ben Duguid
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-26T16:13:38.227Z
Comments.Text: LEGO MINDSTORMS EV3 runs Linux and can be programmed in Python using ev3dev. Perhaps you have been hearing about EV3 instead of NXT?
Comments.UserDisplayName: David Lechner
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-26T20:16:06.457Z
Comments.Text: The kit I have is NXT. I have to use that hardware
Comments.UserDisplayName: Nathan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-26T20:21:35.373Z
Comments.Text: The main source of confusion for me is that, while Java is designed for programs between computers such as website design, Python is specifically designed to program AI algorithms. It being an issue of interpreters I understand, but then why can't we have programming in C++?
Comments.UserDisplayName: Nathan
Tags: <mindstorms><nxt><nxc><python>
Title: How to flash a LEGO Mindstorms brick and program it in another language
UserDisplayName: Nathan
ThreadText: # How to flash a LEGO Mindstorms brick and program it in another language
  
  (Asked by: username_0 on 2018-04-26)
  
  I have a basic LEGO Mindstorms kit which I wanted to use for testing a very simple object-avoidance project.
  
  I am trying to find a relatively simple way to flash the brick and upload scripts to it for executing, preferably something simple like Python or C++. I've been looking around the Internet for a few weeks now and have found almost nothing.
  
  I see [some instructions](https://www.damonkohler.com/2011/01/flash-nxt-ubuntu.html) how to flash the brick with some generic firmware, but no more information how to get to the point of programming it the way I need. I see the most popular source for programming the NXT in Python is [NXT-Python](https://github.com/Eelviny/nxt-python). However, there is 1) no documentation 2) outstanding bugs on the ultrasonic sensor that has not been addressed since 2015 and 3) only executes the program on the PC and sends command to the brick, rather than uploading the program to the brick.
  
  I see that NXT is usually programmed in the language NXC, which fortunately has an extensive [documentation in PDF form](http://bricxcc.sourceforge.net/nbc/nxcdoc/NXC_Guide.pdf). However, this language (based in C) seems like an entire beast of its own, and idk if I would have the time or patience to master an entirely new language just to program for this one small project. Furthermore, the GUI for NXC seems to be only for windows, but I'm using Ubuntu.
  
  NXC seems to be translatable from Python using the [PyNXC library](https://code.google.com/archive/p/pynxc/). However, it also doesn't seem to have any documentation except a couple of examples, and otherwise just pointing to the NXC tutorials.
  
  Anything I am missing here, or is that the entire length and breadth of programming the NXT? I have a feeling there has got to be something more straight forward, as other people online talk about programming the NXT in python as if it was easy.
  
  Thanks
  
  **Tags:** mindstorms, nxt, nxc, python
  
  > **Comments:**
  > **username_1**: Have you checked out the answers to [this question](https://bricks.stackexchange.com/q/679/56) and [this detailed page](http://www.teamhassenplug.org/NXT/NXTSoftware.html)? I think the fundamental issue is the Python limitation. RobotC has three different flavours ranging from Graphical, through [Natural Language](http://www.robotc.net/NaturalLanguage/) down to a more C-like version  
  > **username_0**: The limitation is not really Python, but just some existing, usable language. I did see that chart before, and my issue with it is that the only languages it mentions are Assembly, C, and Java. I could try to install the Java version, I guess, because I don't see myself getting very far programming in either Assembly or C. Even so, Java is not exactly the kind of language meant to be used for a Robot, so idk why I should be forced to use that. As for the rest, I don't want to have to work with a completely new language from scratch, even if it is "C-like".  
  > **username_0**: I can program a Raspberry Pi in any language I want. How much more complicated can a piece of LEGO be?  
  > **username_1**: I think it's more that the NXT is much simpler than the Raspberry PI, and so can't cope with the runtimes required to support higher level languages - Assembly and C are both "low level" languages, keeping you very close to the hardware, while Java is at least compiled to byte-code that then runs in a virtual machine - Python by contrast is an interpreted language, so it needs a runtime interpreter, which in turn requires something to host it.  
  > **username_1**: The NXT has a 32bit, 60MHz ARM processor, 256KB of FLASH memory and 64KB of RAM. The PI Zero has a 1GHz processor, 512MB RAM, while the PI 3 B+ has a 64bit, 1.4GHz processor, 1GB RAM, etc.  
  > **username_2**: LEGO MINDSTORMS EV3 runs Linux and can be programmed in Python using ev3dev. Perhaps you have been hearing about EV3 instead of NXT?  
  > **username_0**: The kit I have is NXT. I have to use that hardware  
  > **username_0**: The main source of confusion for me is that, while Java is designed for programs between computers such as website design, Python is specifically designed to program AI algorithms. It being an issue of interpreters I understand, but then why can't we have programming in C++?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2018-07-03. Score: 2
  
  I've had great success with [Bricx Command Center or BricxCC](http://bricxcc.sourceforge.net/) (as mentioned in [this post](https://bricks.stackexchange.com/questions/679/is-there-any-other-way-to-program-the-lego-mindstorms-nxt-other-than-the-provide)) on my NXT using NXC (which is easy to pick-up when you already have a C/C++ foundation like you've mentioned).
  
  Installation, using the supplied drivers and connecting via USB is a breeze :)
  
  Hope this helps!
  
  
  ---
  
  ### Answer by username_4 on 2018-07-12. Score: 1
  
  In my experience, most 3rd-party firmware can be flashed to the NXT brick using the standard NXT-G software "Firmware Update Tool." As others have mentioned, BricxCC with NXC is also a great option.
  And if you're having trouble with the Python implementation, it's definitely worth checking out [LeJOS](http://www.lejos.org) (Java for Mindstorms). While Java may not be the usual choice for robotics, LeJOS runs fast and is easily the most feature-rich of any language available for the NXT.
  
  
  ---
  
  