MPU6050 DMP code update

Hello,
after very Long Period of Research and test, i have not yet found a solution!! Indeed i am using MPU6050 with the Project of Jeff. It works fine but i want to use a new Firmware (one of the released Firmware from Invensense 5.13). I am not able to find out why while loading this Firmware to arduino pro the procedure of reading is always failed. I am using my own functions to communicate with the MPU6050 (#include<Wire.h>), The functions used for writing and reading 8bits are below,
Well my functions work very fine when i want to reset the chip or configure the gyro or the accel but for the Firmware unfortunately no!! i am writing with arduino the Programm, that was released by invensense to fit an msp430 microcontroller. The procedure to write the Firmware is : specifying the bank by writing to Register 0x6D, selecting the start adress by writing to Register 0x6E and finally writing the 256 Bytes ( 16 Bytes chunk) the first Byte of 16 Bytes is written to the Register 0x6F.
Please can any expert with this chip give me a Little Help!!

int TWI_Schreiben_8(uint8_t reg, uint8_t data) {
Wire.beginTransmission(0x68);
Wire.write(reg);
Wire.write(data);
int status = Wire.endTransmission();
return status;
}
int TWI_Lesen_8 (uint8_t reg) {
Wire.beginTransmission(0x68);
Wire.write(reg);
Wire.endTransmission();
Wire.beginTransmission(0x68);
Wire.requestFrom(0x68, 1);
return (Wire.read());
}
for any other Details please ask me!

The Wire.requestFrom() does not need a Wire.beginTransmission().
That will not help to upload the firmware. You have to compare that with other dmp firmware upload code (a few are on Github).

hey you must try the I2C dev library for MPU 6050 ,using DMP we can get accurate data on roll pitch and yawn ,when you have downloded the library run the sketch below cheers … :slight_smile:

MPU6050.ino (2.54 KB)

thank you all for your comments, well i think i will experience another IMU, BNO055 from BOSCH, i have read ist documentation and the Fusion algorithm edited by bosch ist integrated on chip and no Need to download a Firmware every power on.

MPU6050 mpu;     
#include "MPU6050.h"
    MPU6050 accelgyro;

tarkesh2shar, why did you create two instance of MPU6050 and then later:

       mpu.dmpGetGravity(&gravity, &q);
      mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
       accelgyro.getRotation(&gx, &gy, &gz);
            mpu.dmpGetQuaternion(&q, fifoBuffer);
            mpu.dmpGetGravity(&gravity, &q);

Thanks

Bruce