{"id":299,"date":"2008-02-02T23:05:15","date_gmt":"2008-02-03T04:05:15","guid":{"rendered":"http:\/\/crschmidt.net\/blog\/?p=299"},"modified":"2008-02-02T23:05:15","modified_gmt":"2008-02-03T04:05:15","slug":"accelball-python-n95-accelerometer-demo","status":"publish","type":"post","link":"https:\/\/crschmidt.net\/blog\/archives\/299\/accelball-python-n95-accelerometer-demo\/","title":{"rendered":"accelball: Python + N95 accelerometer demo"},"content":{"rendered":"<p>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 &#8216;ball.py&#8217; example that ships with Nokia&#8217;s distribution of Python for Series 60 (<a href=\"http:\/\/sourceforge.net\/projects\/pys60\">SourceForge<\/a>).<\/p>\n<p>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.<\/p>\n<p>The result came out reasonably well: I even used the webcam on the eeepc to put together a <a href=\"http:\/\/youtube.com\/watch?v=zqZeANFBmis\">little video<\/a>:<\/p>\n<p><object width=\"425\" height=\"355\"><param name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/zqZeANFBmis&#038;rel=1\"><\/param><param name=\"wmode\" value=\"transparent\"><\/param><embed src=\"http:\/\/www.youtube.com\/v\/zqZeANFBmis&#038;rel=1\" type=\"application\/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"355\"><\/embed><\/object><\/p>\n<p>The code is available from my <a href=\"http:\/\/crschmidt.net\/symbian\/\">Symbian page<\/a>, which has received so few changes that it doesn&#8217;t actually even mention my 6600 that I got years ago, and have since upgraded from. <\/p>\n<p>In my searches, I wasn&#8217;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.<\/p>\n<p>Love to hear any feedback if anyone else gives it a shot&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8216;ball.py&#8217; example that ships with Nokia&#8217;s distribution of Python for Series 60 (SourceForge). The ball.py example uses the arrow keys to move a ball around the screen. Instead, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,91,10],"tags":[],"class_list":["post-299","post","type-post","status-publish","format-standard","hentry","category-mobile-platform","category-n95","category-symbian-python"],"_links":{"self":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/comments?post=299"}],"version-history":[{"count":0,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/299\/revisions"}],"wp:attachment":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/media?parent=299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/categories?post=299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/tags?post=299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}