I would like to use the MPU6050 as IMU in my quadcopter. I've been Googling for 2 days, but I can't find anything where this is explained well. I know that the settings are not general, but I hope there exists something like a scheme. I've read couple of samples of code where they describe how to read the raw values etc. but I'm interested in registers settings. The product specification didn't help me a lot.


  • The register settings are specified in the datasheet. What code/programming language are you using? What have you tried and what is causing problems?
    – joan
    Mar 15, 2015 at 10:43
  • I'm using Python, and RPI. I have problems setting the sample rate, gyro and accel DLPF.
    – Alex
    Mar 15, 2015 at 10:46
  • You need to show your work and explain what it is not working as you expect. Personally I'd look at a C implementation such as at i2cdevlib.com to see how to initialise the sensor. The programming language makes no difference to the initialisation sequence.
    – joan
    Mar 15, 2015 at 12:00
  • @Alex I realize this thread is really old but I came across it because I was looking for a solution too but never found one. I was wondering if you ever found a solution or if you are still looking for one? If you are I am currently developing a library in C++ to try and handle this. Apr 11, 2019 at 13:12
  • @NathanielJS I don't remember whether I have found the solution. I think it would be great for those who are coming here in the future to put a link of your library into the answer. Thanks for your comment, I really appreciate it.
    – Alex
    Apr 11, 2019 at 13:52

1 Answer 1


I ran in to the same problem during a project week at Uni, so have started developing a library to allow easy interfacing with a MPU6050 via the I2C Bus. The library is written in C++ and assumes some basic knowledge of C++ to be able to implement it.

As of 11/04/2019 the library is still under development, but if you experience problems with it please let us know and create an issue on the GitHub page. There are only so many devices and scenarios we can test under, and we will work to solve any issues you experience as quickly as possible.

Here is a link to the GitHub repo: https://github.com/NathanielJS1541/RPI_MPU6050_I2C

Hope this helps anyone with the same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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