[Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

Martin Langhoff martin.langhoff at gmail.com
Thu Dec 30 17:34:50 EST 2010


Hi Walter, list,

[ disclaimer: this is a hobby project, likely to proceed at very slow
pace, given insane amounts of real work around XOs ;-) ]

I got a lego nxt 2.0 for xmas! Looking around for how to use it from
Linux, I found NXC (a variant on NQC -- 'not quite C' that compiles to
NXT bytecode). It looks like a really pleasant programming language.

It's the most compelling env for various reasons -- but the
interesting thing is that there is no GUI for Linux, and that the
MacOSX/Windows GUI looks a lot like Turtle Blocks (but doesn't seem to
be as good ;-) ).

Here's a good visual summary, put together by a teacher:
http://www.nebomusic.net/rosettastone.html

What I am wondering is what is the smartest path to a TB "mode" or a
friendly fork of TB that exports NXC code?

After browsing the TB src (looking at master), my observations are

 - I'm very pleased there's a turtleart.py that runs w/o Sugar! Very nice!

 - talogo.py could be an inspiration

 - NXT has very different actions, and fairly specific sensors -- it'd
make sense to have a very different set of blocks available. Also some
blocks have many options. Not sure how to handle these issues.

Ideas?

= Notes on languages and NXT tools =

Notes for anyone else looking into NXT... from most interesting to least

 - NBC/NXC is the most popular tool by all accounts, actively
maintained, and jspaleta is planning to get it into F15. NBC/NXC
creates programs that download to the NXT CPU and run there -- it's a
nice ARM CPU. Fully features, well documented (free online docs). The
author of NBC/NXC has also published an apparently good book.

  http://bricxcc.sourceforge.net/nbc/
  http://www.amazon.com/exec/obidos/ASIN/0973864974/

  Found this tutorial best outline of NXC usage
  http://bricxcc.sourceforge.net/nbc/nxcdoc/NXC_tutorial.pdf

 - There is a python module for it, but it's for Python 2.4, looks
unmaintained, seems very limited in features and it's not clear
whether it creates programs that will execute on the NXT CPU, or just
controls it remotely. Others have reused it and extended it for file
transfers, but it all looks dated; if the NBC/NXC toolchain handles
the actions we need, better.

   http://www.danbbs.dk/~kibria/nxt/nxtsh.py
   http://chromiteblue.com/archive/projects/nxt/nxt_pull-a-companion-program-for-nxt_push/

 - Big chart of options
   http://www.teamhassenplug.org/NXT/NXTSoftware.html

cheers,



m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the Sugar-devel mailing list