Thread: Accelerometers
View Single Post
Posts: 10 | Thanked: 81 times | Joined on Nov 2009 @ Espoo
#46
Originally Posted by dormant View Post
The wiki page demonstrates that the N900 accelerometers do vary their output with orientation and so can be used to determine orientation.

For the life of me, I can't work out how they do it.
An accelerometer _must_ vary its output depending on orientation, as we're constantly under the force of gravity. Turn the device upside-down, and the reading should go from (0,0,-1) to (0,0,1).

If you want to know how these kinds of accelerometers are made, and work, I seem to remember that Freescale Semiconductor had some interesting application notes on their website which included electron micrographs of the innards - wonderful structures. Nokia don't use FSL accelerometers, it's just that I previously worked at FSL and am more familiar with their sensors than any others. The n900's is an ST device, in fact, and the specs are publically available.

Ditto the kernel source - it is all open, so just take a peek at the lis302dl driver. There are some features that aren't utilised, but all the bread-and-butter stuff's supported. There's a trivial sysfs interface for reading the current value, so even shell scripts can use it!

In fact, the running and jumping code in Oliver McFadden's quake3 arena demo just uses that sysfs accelerometer interface. I know that, as I wrote it '-)
 

The Following 4 Users Say Thank You to FatPhil For This Useful Post: