I use a mpu6050 (with arduino uno) in order to measure the yaw pitch roll of a vehicle (car).
The ypr seems to be correct when not accelerating/breaking and not turning left/right; I made some test at the ofice on my desk.
While testing the circuit in the vehicle, I notice that:
Accelerating/braking the vehicle modifies the pich measure from +10°to -10°, which is not the real angle pitch degree variation of the vehicle;
Turning left/right modifies the roll measure (and also the yaw which normal in that case) really too much regarding the real roll angle.
see code in attachment.
What is wrong? Any idea?
inclinometer.ino (13.4 KB)