Re: [ltp] IBM HDAPS Someone interested? (Userspace accelerometerviewer)

From: Paul Sladen
Date: Mon Jul 11 2005 - 04:44:13 EST


On Sun, 3 Jul 2005, Alejandro Bonilla wrote:
> PLEASE read the following article, it has the data of a guy that made a
> driver in IBM for Linux and he described the driver he made.
> http://www.almaden.ibm.com/cs/people/marksmith/tpaps.html

Yesterday evening, I used my time here at Debconf5 constructively! ;-)

http://www.paul.sladen.org/thinkpad-r31/aps/accelerometer-viewer.jpg (43kB)
http://www.paul.sladen.org/thinkpad-r31/aps/accelerometer-lid-shut.jpg (27kB)

The sensor gives us two 10-bit AD values (corresponding to 0..1 volts on the
ADI chip), temperature (Celsius) and three status bits indicating:

* lid open/closed
* keyboard activity
* nipple movement

On the X40 I borrowed (thanks Robert McQueen), at rest the outputs hover
around 512 (0x200). Gravity is supposed to fall off in a sine-wave during
rotation, but I found that:

theta = (N - 512) * 0.5

provides a surprisingly good approximation for pitch/roll values in degrees
in the range (-90..+90) so I think the sensor can do ~= +/-2.5G .

http://www.paul.sladen.org/thinkpad-r31/aps/accelerometer-screenshot.png (9kB)

-Paul

PS. Coincidently, the name of the machine I borrowed is 'theta'...
--
Mostly it snows here. Helsinki, FI



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/