There is a new language for the Arduino / JeeNode / ATmega328, called Occam-π.
I found out about it yesterday, at http://concurrency.cc/ – it’s high level, and it supports parallel programming. The current development environment release is for Mac OS X, with Windows and Linux coming soon.
Here is a complete program with 4 blinking LED’s, one on each DIO pin of the JeeNode ports:
That’s it. Compiles to roughly 2 Kb. Each extra blink adds just 20 bytes, btw.
And yes, it really makes four LEDs blink at an independent rate:
There is slightly more to it than that, but this is mind-blowing stuff. The “parallelism” is simulated, of course. Looks like the ATmega can do around 6000 context switches per second (i.e. parallel task switches).
There is a roughly 20 Kb interpreter part that needs to be uploaded once (which is why this requires at least an ATmega328). After that, the IDE will upload just the bytecode for your program, i.e. 2 Kb in the above case.
B R I L L I A N T .
Imagine hooking up the RF12 driver to this – there’s plenty of room for the extra 3 Kb or so. And for doing all sorts of things… in parallel! My earlier complaint post about how awful it is to do several things at once on an ATmega board might just have been wiped off the table.
Looks like I’ve got some very serious learning ahead of me to try and get to grips with all this.