I want to make a gesture controlled car using this IMU.. What is the simplest way to detect tilts? I've seen many programs on the Internet that calculate the angles but is this really necessary? Why can't we just get components of acceleration in the x, y plane and then detect tilts..Pls tell me how to do this!

1 Answer 1


Well suppose you have a starting position, let's say 0 degrees, then once you detect and angle change, let's say 10 degrees, you know that there is a tilt of 10 degrees on one of the 3 axies.

The MPU6050 is a 6DOF, meaning 6 Degrees Of Freedom. This means that it can detect acceleration on axis: x, y, and z and it can detect gyro angles on axis: yaw, pitch, and roll.

For the best accuracy, use a mix of both acceleration and the gyroscope. This is the best way to calculate position. Heck, the Apollo space program used a gyro and accelerometer to navigate from planet Earth to the Moon.

  • How could I just use accelerometer readings to detect the tilt??
    – Aamir
    Dec 9, 2016 at 14:11
  • You can't, you mainly use a gyroscope for tilt detection, but, in some cases where super accuracy is necesssary, a hybrid of both is great. It is very complex so I don't really want to go in much detail. The MPU6050 has a gyro, why not use it?
    – Dat Ha
    Dec 9, 2016 at 14:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.