Go Down

Topic: Arduino DUE problem with mpu6050 (Read 1 time) previous topic - next topic

jone31

Jul 17, 2016, 11:09 pm Last Edit: Jul 17, 2016, 11:39 pm by jone31
Hello there, i have an arduino DUE anf 10dof mpu6050 and hmc5883l.
i find a library that run the mpu6050 and the hmc5883l  "https://github.com/jrowberg/i2cdevlib"
the library works fine after the compilation. but when i reset the DUE or i compile for the next time the prpgram does'nt work, i get this message

Testing device connections...
MPU6050 connection failed

Send any character to begin DMP programming and demo:
Initializing DMP...
DMP Initialization failed (code 1)

please i need help

SurferTim

Is the board you are using compatible with 3.3v logic? Some are not. If you have a question about it, you should post a lnk to the board you are using.

Have you tried the i2cscanner program to determine if the device is showing up all the time?

jone31

Hi, thanks for the answer. i think my due is compaible with 3.3v because it has a 3.3v pin.

here it is the schema of my due and the gy87



the i2c scanner



i recognize another problem. when i use the i2c scanner i find only 2 adresses, i should get 3 adresses.
.3 accel + 3 gyros (MPU-6050)
, barometer (BMP-180)
3-axis magnetometer (hmc5883l)

the i2c scanner does'nt finde the adresse of hmc5883l.

i think this is why program does'nt work correctly, we have to find all those adresses

so could you help me how to fix this problem.
i use 10dof gy87.

thanks

Palliser

Hello jone31,
Probably in the following post (link) you'll find the answer to your issue.

https://forum.arduino.cc/index.php?topic=223345.0

Regards,

-p

jone31

Thanks i add this code in void setup()
Code: [Select]
  //Bypass Mode
Wire.beginTransmission(0x68);
Wire.write(0x37);
Wire.write(0x02);
Wire.endTransmission();

Wire.beginTransmission(0x68);
Wire.write(0x6A);
Wire.write(0x00);
Wire.endTransmission();

//Disable Sleep Mode
Wire.beginTransmission(0x68);
Wire.write(0x6B);
Wire.write(0x00);
Wire.endTransmission();



but i have another problem.
the yaw change his value when i did a roll or pitch. why ??
i want the value keep the his value even we make a roll or a pitch

thansk in advance

Go Up