How t convert raw data from MPU6050 into angles?

Hi,

I am quite new to programming and Arduinos in general. I am using an Uno R3 with the gyroscope from an MPU6050 sensor to show orientation in degrees. I have managed to display Raw values :dance:

However, my problem now lies to convert the Raw data into useful data.

I am struggling on where to start and how to approach this next step.

I have attached the code in the link below.

Code: https://docs.google.com/a/my.shu.ac.uk/ … sp=sharing

Would someone be kind enough to explain what I would need to do next in order to convert the Raw data into degrees? What extra coding needs to be done?

If there is anything needed to answer the question, please ask!

Thank you

That program does a very crude integration of the gyro rate outputs, and the results will be totally unsatisfactory.

You need AHRS (Attitude Heading Reference System) software, which is very complex. To learn something about the theory, start here: http://www.chrobotics.com/library and work your way through the articles.

The most sophisticated open source software (RTIMUlib) that is also Arduino compatible is no longer supported, but should work with the MPU6050. You can read about my experience implementing RTIMUlib using another sensor in this forum post: https://forum.pololu.com/t/state-of-the … or-25/8091