This is the official place for news and downloads of pbLua, an exciting new text-based language for the Mindstorms NXT.
The latest version of Lua is beta-21a and is available for download here
Acknowledgement of Support and Request for Equipment
Putting together pbLua is really a labour of love for me. I have maybe a dozen hard core users that send back bug reports, test firmware, and give me encouragement. Often, this is enough to keep me motivated to move forward with development. I love getting email, positive or negative.
I’ve managed to build and test simple development environments on Windows and Linux using VirtualBox and VMWare. It’s harder to do that with Mac OSX but I have a few Mac users that have really helped out with that end of things.
The PayPal donation button is a great way to support the project, but you can also help by donating equipment. I’m looking for access to any of the newer Android-based portable applicances so that I can develop install guides for them. It will be pretty exciting to extend the programming possiblities for the NXT to the newer generation of portable computing devices.
What Is pbLua?
In a nutshell, pbLua is replacement firmware for the NXT that allows you to write sophisticated programs for the NXT using any text editor, and to send the programs to the NXT using Hyperterminal, screen, minicom, or any dumb terminal program.
pbLua is operating system and hardware agnostic – which means you can control the NXT from any device that supports either USB and/or Bluetooth as a serial port device. You can use pbLua with Windows, MacOSX, Linux, and pretty much any other OS you can name. There are pbLua users that send programs using their mobile phone.
There is no compiler to install, no IDE to learn. All compilation and execution happens on the NXT itself. There is support for all of the NXT peripherals, I2C and RS485 devices, Bluetooth and USB communications as well as floating point math, arrays, strings and lots of other great features.
pbLua on the Web
If you are using pbLua and have a website that features a model or tutorial based on pbLua, I’d like to put a link to it here! Feel free to email me details and I’ll post it here.
- Philippe Hurbain's 3d Scanner
- Philippe is well-known in the NXT community, and he’s also an awesome parts author. For really complex shapes, he build a 3D scanner that generates a surface mesh of the object.
- Mark Crosbie's OSX Tutorial
- Mark Crosbie is a new user of pbLua, but he’s already solved the occasional problem with getting the NXT to communicate with an OSX system. Well worth the read.
- askr's pbLua Corner
- askr is a real die-hard pbLua user. He’s made some amazing sensor add-ons. You have to see his site (and be a geek) to believe it!
Introduction
Way back in 1998, I got one of the first Mindstorms RCX programmable bricks and promptly set about writing a text based language for it. The result was pbForth, which was used in many
different applications around the world. The pbForth code was compiled on the RCX by the RCX – no external computer was needed. pbForth was very fast, but the language was frankly scary to read and learn.
Fast forward to 2005. Lego releases the next generation robotics kit – the Mindstorms NXT. Inside the NXT brick is a 32 bit ARM7 microcontroller with 256K of FLASH and 64K of RAM. The 3 motors in the kit are powerful, and have built in rotation sensors. There are 4 sensors in the kit, including touch, light, sound, and even an ultrasonic range finder.
The programming system is redesigned from the ground up and is GUI based. It’s ideal for 95% of all robots you are likely to build, and it is especially kid-friendly. But for dinosaurs like me, it’s not text based.
As many of you know, I was one of the 4 users selected for the Mindstorms User Panel that was profiled in the February 2006 issue of Wired Magazine. I was called a “firmware expert” in the article, and I guess that’s what I do for a living. At the time I was already thinking about what kind of language would be ideal for programming the new NXT.
And that’s when I discovered Lua. It’s a really beautiful little language that’s used in all kinds of applications. But more importantly for our purposes, it has these characteristics:
- It’s written in portable C, with minimal runtime requirements
- It can be compiled on the fly on the target machine, which is the NXT in our application
- It’s a small, easy to read, and easy to write language
- It has extensive documentation available online and in dead-tree format, and a very friendly newsgroup