Posted in default on February 12th, 2008 at 09:03:43
I’m in DC on Wednesday morning for a meeting: Flying in tonight, arriving around 6, staying at the Holiday Inn in Reston. If there’s anyone who I should be stopping over and having a beer with tonight, let me know: at the moment, my plan is just to wander around DC monuments for a couple hours tomorrow night, since I Haven’t been able to find anyone I should be meeting. (I’m booked until my plane leaves on Wednesday; the trip is not about seeing DC, just a quick hop down for work.)
So, today, I built a small application to demonstrate the use of the accelerometer built into the Nokia N95. I decided to convert a simple example: the ‘ball.py’ example that ships with Nokia’s distribution of Python for Series 60 (SourceForge).
The ball.py example uses the arrow keys to move a ball around the screen. Instead, I wanted to tilt the screen to do it.
The result came out reasonably well: I even used the webcam on the eeepc to put together a little video:
The code is available from my Symbian page, which has received so few changes that it doesn’t actually even mention my 6600 that I got years ago, and have since upgraded from.
In my searches, I wasn’t able to find a lot of source code for pure-Python scripting using the accelerometer, so hopefully if anyone is looking for demos of accelerometer usage, they can take this as an example in Python.
Love to hear any feedback if anyone else gives it a shot…