Get the real acceleartion and the real velocity

Hi there, i want to visualize a real acceleration and a real velocity from a sensor mpu6050.

i use a nice library from i2cdev of Mr jrowberg.

so when i cal the the function getZvelocity() and the sensor is in a flat , the serial monitor show me values close to 16384. so Mr jrowberg use AFS_SEL0 +/- 2g.

so to get the real acceleration i do (getZvelocity()/16384 )*9.81 ???

and if i want to get the velocity how do i integrate the getZvelocity(), to get velocity in cm/s thanks

Your first year calculus book will show you that.

Paul

But knowing the acceleration is not going to help much in determining the velocity. A car travelling at a constant 50Km/H has an acceleration of 0 meters per second per second.

You have to look at the spatial coordinates x,y and z at timeA. You have to then look at them again at TimeB (say C milliseconds later). Work out the distance travelled in C milliseconds using basic 3D geometry and you have a velocity.

If you are in luck, there are support functions in the library.