On Saturday 20 September 2008, Joel Newkirk wrote: > I wrote a short shell script to repeatedly take the raw output from one of > the accelerometers (/sys/devices/platform/spi_s3c24xx_gpio.1/spi0.1/dump) > and massage the data to output X,Y,and Z-axis readings in decimal, -128 to > 128. > > With my Freerunner sitting flat, face up, on the concrete slab of my house, > the 'Z' reading (positive Z is toward the back of the handset, BTW) > fluctuates between 51 and 56. (X and Y range from -1 to 2) That's a > variance of +/- 5%, and I'm fairly confident gravity isn't fluctuating > significantly... ;) > > Is that to be expected, is my Freerunner defective, or am I doing something > wrong?
What does the datasheet say about noise levels? You're looking at +/-5% of reading but +/-1% of full scale which isn't implausible for a cheap accelerometer. > I'm trying to develop a simple tool that will determine 'down' based on > output from the accelerometer, and indicate deviations from various > 90-degree orientations - will I need to massage the data further to ignore > variations, should I be averaging several readings, or what? Underspecified ;-) How accurate does it need to be? Is the phone expected to be stationary or moving? Is power consumption important? _______________________________________________ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community