Saturday, January 12, 2008

Program Lego Mindstorms NXT Robots In Ruby (Rubotz v0.0.1)

Announcing Rubotz, a Ruby code generator for Lego Mindstorms NXT.

First, download and install NXC.

Then gem install rubotz.

Then fill out the config YAML (it only takes a second).

Next write your program in Ruby, and use the Rubotz.compile command to generate an executable .rxe file in your NXC bin directory.

Finally, use a third-party library like NXTBrowser to transfer your executable to your Mindstorms NXT brain.

Boom: robot. Programmed in Ruby.

However please note: Rubotz v0.0.1 is a proof-of-concept developer release only. It currently only supports one sensor, synchronized motor functions, and single-threaded NXC. The full complement of available sensors, motor functionality, and threads should become available in future releases, and if you want to help that happen, go for it.