New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPU6050 Documentations #466
Comments
Thank you, the links you provided are behind Invensense developer login. I've registered with Invensense years ago. while this is helpful, I've struggled to create a functioning code that works on an Arduino UNO (atmega328p) as is. Several examples are out there that use this example code but leave out some important features. As you know there are 2 parts to the MPU. it seems that everyone has some working code for working with the registers and can get raw data from the MPU quickly. What is more difficult is gathering processed data from the DMP firmware. The Firmware register memory locations change between versions and the documentation is vague just as you mentioned. My project Simple_MPU6050 took a different approach to solve the problem. I changed and tested configurations of the DMP registers using several sketches. After determining which registers provided the best results (most useful options) I re-captured the firmware instance with registers changed prior to the start of execution. In this way, it is pre-configured for a specific purpose, although it could be re-configured to do something more/else. most of us here in the Arduino community could care less about things like android orientation etc. How my code differs: I still used Jeffs I2Cdev library but, instead of creating a function for each operation(resetFIFO(), etc.), I created macros for each register and even for each bit(s). Just place the macro in your code and it executes a common function using I2CDev library that is configured to perform the proper register/bit read/write. I am interested in implementing the 9 Deg of freedom by using the magnetometer as part of the equation. It looks to be a separately compiled library the Arduino UNO must execute. I am hoping to use that library but my skills at programming are maxing out as this is a hobby for me. :) |
I finally acknowledge that this library is the most complex one out there but during my experiments I noticed that is is not that well designed and even has some critical flaws in it. The provided manufacturer files goes deep on how to compile DMP thus I thought there might be some source code in it to, the goal was to give others a chance to figure it out as I might not be able to do so. |
So Go to this directory int the 6.12 download you linked to Can this library work on an atmega MPU. if so can you provide me with a compiling sketch to test? |
Will this help ? motion_driver_6.12\msp430\eMD-6.0\core\driver\eMPL\inv_mpu.c it seems that it has compass support! |
I can access the compass and I have DMP mostly figured out.
Reference: Motion Driver 6.12 – Features User Guide Z |
I never had to do so, in case I saw something useful will let you know. for now take a look at this wiki |
I was fidgeting around an saw this In case this is what you(@ZHomeSlice ) were looking for take a look at |
MPU 6050 with compass is a MPU9150 |
You know that when they are using another chip for magnetometer they are forced to use i2c, so what stops you from using one ? |
Nothing! The only advantage is that the MPU6050?MPU6500 portion of the MPU9150/ MPU9250 has the ability to access this data and store it in the magnetometer... For that fact, it could access literally any other i2c device and store its data in the MPU's memory ready for you to use possibly saving a small amount of memory and time. Just add anything to the secondary i2c input on the mpu6050 pinout. The DMP Firmware does not have any way to use data from the magnetometer and in order to get the full 9Degrees of freedom, you must use their pre-compiled library (libmplmpu.lib Found in directory motion_driver_6.12\msp430\eMD-6.0\core\mpl from this website Requires registration https://www.invensense.com/developers/login/?redirect_to=software-downloads) to integrate the magnetometer corrections into the gyro accelerometer measurements. |
The other day I was looking around and noticed EMD v5.1.3 And I noticed that they quote " |
Yes, it just confirms that DMP has no obvious way to integrate the compass. Which if you peal the example code apart you discover compass intercession is not part of dmp but requires you to use a library. that they have created for specific processor types. if we can figure out how to make this library work with some or all the Arduino products it would provide compass integration |
I got involved in a MPU6050 project, honestly this one really hearts! No well known documentation and not having an error free code anywhere
I am willing to share what I gathered over the past month or so. (Some might seems to be duplicates but they have minor differences, revision 4.2, for example is missing DMP control registers!!! )
I also include sample codes provided by the manufacturer which you can download as instructed in here
Full Docs and provided codes are available at here
The text was updated successfully, but these errors were encountered: