Using the MPU6050 Gyro/accel

Hi everyone,
I just have a quick question about the MPU.

I've been trying to use the MPU6050 with the arduino and I am able to read from the accel and gyro values fine.

I used the example code from Arduino Playground - MPU-6050

But the weird thing is that the values of x,y,z from the accel seem to always be fixed values when the chip is left unmoved. This is as if the values are actually vector orientations as opposed to changes in accelerations.

I am not sure if this is because of some setting or if thats what the values actually mean and was wondering if anyone has any ideas?


The raw values are not compensated for offset.
If the sensor is not moved, you measure the earth gravity, the offset, and the noise.

The earth gravity is a static force, but that is the same as measuring the acceleration.

Are your values like the values on that page (look for "measurements").

Ok, yes my values are similar to that of the example website. While static acceleration is great, I am more interested in dynamic acceleration.
Thus does this mean that I can calculate that by taking the changes in "static" acceleration values?

Yes, that how it is done. It is called: offset compensation.
You could use the average of about 10 samples for the offset.
The dynamic value will be the actual value minus the offset.

Many times a filter is used. This is a good guide:,58048.0.html