Posted: August 19th, 2011 | Author: john | Filed under: nanonote, packedobjects, The Clashing Rocks | Tags: guile, nanonote, packedobjects, scheme | No Comments »
This project is about using embedded Linux devices to detect, record and react to seismic events. The idea is to use accelerometers to detect shaking and then communicate this event to all other devices connected to the same broadcast group. We are developing the technology using OpenWrt which allows us to use a range of hardware including routers and pocket computing devices. We really like the idea of exploring emerging low-powered, low-bandwidth mesh networks in developing countries. In this video you can see some early work using a network of Ben NanoNote computers fitted with WPAN hardware. Three devices are connected to a Spread daemon running on a co-ordinating device. Because our current hardware lacks accelerometers we run a program on one device to send fake accelerometer data onto the network. Each device should then pick up this data across our wireless network. We are currently able to get some basic support for IP networking using a hack by Werner Almesberger who also developed the WPAN hardware. In the video you can see the devices display a bar graph indicating it received data. Only one bar is registered as only one device is transmitting. This bar graph could act as a finger print for deciding the scale of seismic activity in a larger network. We intend to add some more intelligence to this part by building a some kind of knowledge system. Currently the project is at a very early stage with some basic infrastructure developed in C. The aim is to extend this infrastructure by embedding GNU Guile. This will allow us to dynamically control how we communicate, store and process the structured data shared amongst devices. Part of this system will involve trying to minimise the quantity of structured data exchanged on the network by serialising to bit-level using Packedobjects.
Further details of the project can be found at The Clashing Rocks wiki.
Posted: April 3rd, 2010 | Author: john | Filed under: packedobjects | Tags: guile, packedobjects, scheme | No Comments »
I personally view Scheme as a good extension language. Something that can be embedded into C code to ease the pain of doing everything in C. I am interested in exploiting this concept on embedded systems where there is a lot of fooling about to make a binary. I still intend to produce binaries and reuse the large amount of existing C code out there. However, I want to script the network communication and in particular the structure of the network packets. I have periodically been working on a tool that attempts to support this. This summer I intend to get rid of the old C code in this project and rewrite it entirely in Scheme apart from the low-level encoder/decoder which will remain in C. In this white paper I attempt to describe the work.
**update**
This white paper has now be superseded by the paper “Everything counts in small amounts“.
Posted: December 5th, 2009 | Author: john | Filed under: Handhelds | Tags: guile, openmoko, scheme | No Comments »
Having Guile running on an embedded device is very powerful. You can add scripting capabilities to a C program and avoid some of the cross compilation -> deploy cycles by simply editing the script to change some functionality. As an example I have taken the code from the excellent introductory article Scripting with Guile. I packaged the code so that if you install the tarball or the ipk it will install both the binary and script to a suitable place.
Tarball: http://zedstar.org/tarballs/square-0.1.tar.gz
ipk: http://zedstar.org/ipk/square_0.1-r0_armv4t.ipk
After installing Guile do:
root@om-gta02 ~/ipks $ opkg install square_0.1-r0_armv4t.ipk
Installing square (0.1-r0) to root...
Configuring square
root@om-gta02 ~/ipks $ square
result of square is 49
result of square2 is 81
Posted: December 4th, 2009 | Author: john | Filed under: Handhelds | Tags: guile, openmoko, scheme | No Comments »
I recently got hold of a bunch of Openmoko Freerunners. I needed a distribution which installs to Flash (NAND) so I chose SHR.
I am very impressed how things have progressed especially in terms of being a phone!
Anyway, this gave me a chance to try out some Guile packages I built. If you have a recent version of SHR unstable the following should work:
http://zedstar.org/guile/
Happy Scheming!
Posted: November 9th, 2008 | Author: john | Filed under: General, packedobjects | Tags: chicken, guile, packedobjects, scheme | No Comments »
I have lately been very busy with work, life and the universe and subsequently have done little hacking. I have recently been examining Guile. Guile has been part of OpenEmbedded for a while so should be easy to get running on numerous embedded devices. Chicken was very recently added to OpenEmbedded, however, lacks support for building eggs in this environment. One thing I really love about Chicken is its very easy to use foreign function interface (FFI). After spending the odd hour over various weekends I have finally begun to grok Guile’s FFI. I plan to build packedobjects for Guile and possibility extend its features.
I really like the idea of extension languages ever since I did some work with Tcl a number of years ago. A great example application was Eggdrop the IRC bot. Lots of kids at the time would program their eggdrop bots using the simple Tcl interface. I think a lot can be said about this approach in terms of learning/teaching programming. I hope to explore this further with my education hat on.