<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Im using my own software, so I swear its not a software issue^^. Im not getting zeros, though, just very small values, that can have a negative sign, too, but do not change.<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">Von:</span></b> Michael Tansella &lt;michael-tansella@gmx.de&gt;<br><b><span style="font-weight: bold;">An:</span></b> List for Openmoko community discussion &lt;community@lists.openmoko.org&gt;<br><b><span style="font-weight: bold;">Gesendet:</span></b> Sonntag, den 5. April 2009, 21:34:08 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> Re: [SHR] latest unstable with
 problems!<br></font><br>&gt; How do they not work? Probably you just use applications that nobody<br>&gt; cares to update to handle the proper way of reporting accelerometer<br>&gt; events that was announced about 2 months ago?<br><br>I used the python script from the wiki and it delivered only zeros.<br><br><br><br>#!/usr/bin/python<br>import struct<br>from math import sqrt<br><br>x = 0<br>y = 0<br>z = 0<br>secondsensorfile = "/dev/input/event3"<br>#int, int, short, short, int<br>fmt = 'iihhi'<br>#open file in binary mode<br>in_file = open(secondsensorfile,"rb")<br>event = in_file.read(16)<br>while event:<br>&nbsp;&nbsp;&nbsp; (time1,time2, type, code, value) = \<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; struct.unpack(fmt,event)<br>&nbsp;&nbsp;&nbsp; time = time1 + time2 / 1000000.0<br><br>&nbsp;&nbsp;&nbsp; if type == 2:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if code == 0:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; x =
 value<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if code == 1:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; y = value<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if code == 2:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; z = value<br>&nbsp;&nbsp;&nbsp; if type == 0 and code == 0:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sum = int(sqrt(x*x + y*y + z*z))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; print x, y, z, sum<br>&nbsp;&nbsp;&nbsp; event = in_file.read(16)<br>in_file.close()<br><br><br>_______________________________________________<br>Openmoko community mailing list<br><a ymailto="mailto:community@lists.openmoko.org" href="mailto:community@lists.openmoko.org">community@lists.openmoko.org</a><br><a href="http://lists.openmoko.org/mailman/listinfo/community" target="_blank">http://lists.openmoko.org/mailman/listinfo/community</a><br></div></div></div><br>


      </body></html>