PDA

View Full Version : Accelerometer reading



joseph Degorio
- 7th February 2011, 15:13
Hi everyone,
I know this may very easy to some, but can you advice me how to interpret the following values bellow received from USART in order for me to turn a motor clockwise or counter clockwise.

x -17 y 40 z -39
x -17 y 38 z -35
x -17 y 39 z -36
x -15 y 41 z -34
x -14 y 41 z -34
x -14 y 43 z -34
x -14 y 42 z -33
x -13 y 42 z -34
x -12 y 42 z -34
x -13 y 43 z -35

These values came from a mobile phone with accelerometer sensor.

Thanks in advance,
joe

ScaleRobotics
- 7th February 2011, 15:26
It might help to know what the readings are with the phone vertical, about 45 degrees to the right, 90 degrees to the right, and the same for the left. I don't quite understand what you are trying to do. Are you trying to make an application that reads the tilt of your phone?

I wrote some code for tilt sensing, but my accelerometer only gave me positive values (from analog ports). Its a little complex figuring out actual degrees. Might be easier to figure out just which way you are turning it.

http://www.picbasic.co.uk/forum/content.php?r=210-Angle-determine-tilt-from-3-axis-g-sensor

joseph Degorio
- 8th February 2011, 11:43
It might help to know what the readings are with the phone vertical, about 45 degrees to the right, 90 degrees to the right, and the same for the left. I don't quite understand what you are trying to do. Are you trying to make an application that reads the tilt of your phone?

I wrote some code for tilt sensing, but my accelerometer only gave me positive values (from analog ports). Its a little complex figuring out actual degrees. Might be easier to figure out just which way you are turning it.

http://www.picbasic.co.uk/forum/content.php?r=210-Angle-determine-tilt-from-3-axis-g-sensor

Thanks for the info and link, scalerobotics...appreciated it very much.

regards,
joseph