LEGO® MINDSTORMS® NXT 2.0 Support in Debian/Ubuntu

A LEGO® MINDSTORMS® NXT 2.0 recently arrived at our house. Of course it only comes with proprietary support for Windows/Mac, so I set out to see what FOSS support for the hardware I could find.

I found nxt-python. It wasn’t packaged, so I packaged it up and uploaded to Debian (from whence it came to Ubuntu). It’s now in for the next release of both distributions (Wheezy/Precise).

This is a bit different than the provided software (which compiles code, downloads it to the NXT, and then runs it untethered). For nxt-python the nxt needs to be connected to your computer via USB or bluetooth. It’s a lot of fun and it’s given me a chance to introduced our youngest child to the idea that there’s more to computers than point and click.

Currently user level access to the device doesn’t work, it has to be accessed by root. Fixing that is on my TODO.

I hope someone else out there has an NXT and enjoys this too.

UPDATE: Added a udev rule and uploaded again, so anyone in plugdev can access the NXT brick.


10 Responses to “LEGO® MINDSTORMS® NXT 2.0 Support in Debian/Ubuntu”

  1. 1 Brad January 15, 2012 at 17:00

    Here is a link to a site with fairly comprehensive documentation. I included the 10 sub-links of that for your convenience. Please peruse through this site. The site contains links to MOST, if not all, of the projects relating to Linux + Lego Mindstorms NXT 2.0.

    Finally, there is a link to the wikipedia page on the subject, covering a fair amount of topics that you can peruse as well.

    Good luck in your endeavors .

    Lego Mindstorm with Linux Mini-HOWTO
    *The Mindstorms Architecture
    *Not Quite C (NQC)
    *TinyVM and leJOS
    *Remote Java APIs
    *TCL RCX
    *Other Linux Tools
    *Other sources of information

    Wikipedia entry on Lego Mindstorms

  2. 2 Holger Böken January 15, 2012 at 18:04

    There is a large community using Lejos to run java code on the robot. You can find more information on Enjoy!

  3. 3 Jono Bacon January 15, 2012 at 20:26

    Nice! I have been thinking about getting into mindstorms too, Scott. How flexible is the software you packaged when compared to the bundled software? Is it as flexible?

    Thanks, Scott!

    • 4 skitterman January 15, 2012 at 23:49

      It works at a very different level.

      The bundled softare is programming via point, click, and drag. One selects an object, defines parameters, and then places it in the logic flow visually.

      This is a Python module and some scripts. There are predefined object types for many of the same basic functions as the included tools, but it’s Python, not point and click.

  4. 5 chenxiaolong January 15, 2012 at 22:07

    Nice article, Scott!

    I’m more familiar with C++, but this will give a chance to learn some Python coding 🙂 I’ve always wanted control my NXT vehicle with something like the Wii remote. Now that there are libraries for both… 😀

    I’m wondering if you saw how Fedora packages python-nxt? The latest packaging is available here:

    They have a udev rule that allows users of the ‘lego’ group to communicate with the NXT. Maybe your Debian/Ubuntu packages could do something similar 🙂

    • 6 skitterman January 15, 2012 at 23:52

      Thanks. Adding a udev rule is where I was headed, I just didn’t have a chance to look into it. Having the Fedora packaging to look at will definitely be a help.

  5. 7 studentz January 15, 2012 at 23:51

    hi there

    Also, here is something more:

    I have played withNXT for 4 moths. I wonder If we can create a wiki only for ubuntu. 🙂

    • 8 skitterman January 15, 2012 at 23:54

      I don’t know that something Ubuntu specific is needed, since this should work in any distribution pretty much the same, but if you feel the need, you should JFDI.

  6. 9 S.E.T. August 19, 2012 at 20:18

    I am new to nxt, and am wondering if nxt-python is thread-safe.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: