# VEX Accelerometer

I am planning on using the VEX Accelerometer on my next robot. Does anyone know what unit the value will be given in if you use SensorValue on the accelerometer? If it isnt a unit of acceleration, does anyone know how to convert it to a unit of acceleration?

Hi Paul,

I think based on you saying “does anyone know how” you wanted your post to be answerable by anyone on the forum, so I’ve moved it to the General Forum section. Only a few of us from the ROBOTC team can respond in the ROBOTC Technical Support section.

Regarding your question, you’ll find some good info here: https://vexforum.com/wiki/index.php/Analog_Accelerometer_V1.0

Thank you for moving it!

magicode posted some code here.

Are you planning to try and integrate to velocity and then distance? or are you planing to use it as a tilt sensor ?

I am planning on using it to measure distance. I know that an encoder would usually be easier, but since my teams robot is using an X-drive, I thought that it would be easier to use the accelerometer that we have. I understand the basic idea of how to determine distance, but I would have to have a value of acceleration from the accelrometer.

Most likely you would have better results using encoders and math. However, good luck to you and it would be quite extraordinary if you are successful at manipulating / filtering the data to be consistent and usable. There is A LOT of noise, even with the robot stationery and you would be surprised how much vibration that would effect the sensor and data.

Good luck.

Take the value of a certain axis while the accelerometer is sitting on an absolutely level surface in relation to that axis (the axis is exactly perpendicular to the ground). That reading is 1G. Then take the reading of that same axis when it is exactly parallel to the ground. That reading is 0G. To obtain acceleration, simply do (1G - 0G)/9.81; This gives you the ratio of accelerometer values to m/s^2.