accellerometer test

Andy Green andy at openmoko.com
Thu Apr 3 15:47:44 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somebody in the thread at some point said:
| Am Donnerstag, den 03.04.2008, 09:57 +0100 schrieb Andy Green:
|> We can wake up from one of the accelerometers and not the other -- which
|> is likely okay for real use -- but there is no driver support or API to
|> enable or disable it yet.  I guess it can just expose something in /sys.
|
| Agreed. Can we program the threshold for the three axis individually? If
| so, I'd like to have something like
|
| echo "600 -1 -1"
|> /sys/class/accellerometer/gta02-lis302dl/wakeup_threshold
|
| before falling asleep.
|
| The -1 would mean "ignore this axis", the 600 would refer a change of
| 0.6G irrespectively of sign.

For reference the datasheet is freely available here:

http://www.st.com/stonline/products/literature/ds/12726.pdf

It seems to me there is basically one number you can set, and then you
can decide if X, Y and/or Z go above or below that number makes an
interrupt.  It looks like this number is absolute, ie, if you set it to
5 then going above or below 5 x 18mG "in + or -" will trigger it.

So you can almost get what you are looking for, just that there is only
one number allowed.

- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkf04AAACgkQOjLpvpq7dMoCywCeOAvQiWYOZ8xuEHQbQ6o4X4Mr
vA0AnRJxuAmCnLcpItcfYp6Nx6R8hDg1
=5W3y
-----END PGP SIGNATURE-----




More information about the community mailing list