Yes, the gyro is what I intitally wanted to use. But it gives me random high value readings (even with no motion at all), which seem odd to me, so I switched to the magnometer.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Wow, really nice! You're actually using the magnetometer rather than accelerometer/gyro?