[ltp] IBM HDAPS Someone interested? (Userspace accelerometer viewer)

Paul Sladen linux-thinkpad@linux-thinkpad.org
Mon, 11 Jul 2005 10:42:26 +0100 (BST)


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