Accelerometers in Kernel 2.6.28-rc4

Michael Tansella michael-tansella at gmx.de
Sat Jan 24 17:21:09 CET 2009


> Could you test to set the threshold value to something low, e.g., 18 or
> so? Also check the threshold file afterward you've set it so that it's
> not zero, values which are too low to be represented by the threshold
> code get rounded down.

HI,
I made a mistake. I do not really get two different values I get twice the same 
(3D) value but a different timestamp (see below). But anyway this is not 
correct. I don't want to set a threshold, because I need every value with an 
equidistant timestamp. Any idea what's going wrong?

> Do you have this test program to share?
I send U  the binary of my C++ Acc Test tool offlist. If somebody else wants it 
I can send it. I attached the source code.

You should use it with 2.6.28 Kernel otherwise U must set threshold and 
sample_rate manually because it is in a different folder.

you will need to install one additional lib:
opkg install libgio-2.0-0

It's a simple terminal tool use it the following way:

MokoAcc [Number of Loops] [Accelerometer 1 or 2] [100 or 400 (Hz)] [threshold]

for example: ./MokoAcc 10 2 100 0

and it will create a log file in the same directory:

cat AccLog_Acc1.txt
455.131012 -0.528137 0.704183 5.633463
455.322998 -0.528137 0.704183 5.633463
457.576996 -0.176046 0.704183 8.978332
457.766998 -0.176046 0.704183 8.978332
460.061005 -0.352091 0.704183 8.626241
460.411987 -0.352091 0.704183 8.626241
462.503998 -0.352091 0.880229 8.626241
462.700012 -0.352091 0.880229 8.626241
484.566010 -0.352091 0.704183 8.626241
484.790009 -0.352091 0.704183 8.626241

first value is the timestamp in ms the X,Y,Z;

Greets 
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AccTest.tar.gz
Type: application/x-compressed-tar
Size: 1686 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/community/attachments/20090124/9272b64d/attachment.bin 


More information about the community mailing list