I recently released a tutorial and all the needed code to build an orientation tracker. I first thought about building this tracker when doing a course as a guest a while ago, so now it’s coming back.
I think the possibility to sense the orientation of things in real-time opens up a whole new dimension of possibilities in Physical Computing. Even more when it can be done wirelessly.
Tutorial and code is here: http://dev.qu.tu-berlin.de/projects/sf-razor-9dof-ahrs
Hope this will be useful,