Monday, August 29, 2011

Squeak Etoys on ARM-based OLPC XO-1.75

First post this year, yikes! The last one was about ESUG 2010 in Barcelona, now I just returned from ESUG 2011 in Edinburgh. While I was there, a package with the shiny new XO-1.75 prototype arrived.

Incredibly, the pre-installed Etoys simply worked! Never mind the change in processor architecture, the Fedora folks have done a great job compiling the Squeak VM for ARM and so Etoys just works. Of course that's just as it should be, but it's still awesome. And e.g. Squeakland's own Etoys-To-Go would not have worked, as it only includes binaries for Intel-compatible processors.

Another great addition is a 3-axis accelerometer. The Linux kernel's driver exposes it as a file at /sys/devices/platform/lis3lv02d/position. Gotta love the unix design of exposing devices as files. All it took to make this usable from an Etoys project was just an object with ax, ay, and az variables that get set with one simple textual script:
Another simple script can use this to control a ball (the "rebound" script just keeps it on-screen):
Fun all around—it's a bit a hard to see the yellow ball in the Video, but Jakob enjoys it anyway:
Also, uploading from Etoys directly to Squeakland using Wifi just worked. Yay!

Update: If you want to try my uploaded project on your XO-1.75, you need to save it once from Etoys, quit Etoys, and run it again. Otherwise it won't work - it was signed by my key so the Etoys security sandbox prevents it from opening the accelerometer device. The saved copy will be signed using your key so no sandboxing happens.

10 comments:

Kevix said...

awesome progress of the sensor useage

Karl Ramberg said...

Nice

David said...

This is fantastic news. What simple code to make the ball roll around!

C. Scott Ananian said...

I just stumbled across Lively Kernel 2.0 and was pretty impressed: http://lively-kernel.org/repository/webwerkstatt/documentation/7funthings.xhtml

Bert said...

Yes, Lively is awesome. Hope someone will make an Etoys-like environment on top of it :)

basicforge said...

Cool. Does the VM for the ARM XO also work on the Raspberry Pi?

Bert said...

The VM should work on the Raspberry Pi, yes.

Charles Schultz said...

Glad that the VM should work on the Pi, that is totally awesome. How do I go about learning how to install and use the Linux VM on the Pi to allow eToys to work? Point me to a URL and I'll go read it. :)

You rock! Thanks.

Charles Schultz said...

Glad that the VM should work on the Pi, that is totally awesome. How do I go about learning how to install and use the Linux VM on the Pi to allow eToys to work? Point me to a URL and I'll go read it. :)

You rock! Thanks.

Bert said...

The VM is already pre-installed in the Raspbian image to allow Scratch to work. I think you just need to "apt-get install etoys" to get Etoys, too.