Jump to content
I2Cdevlib Forums

Recommended Posts

Dear all,

 

I have been using a breakout board for mpu 6050 and tried executing various mpu 6050 codes by Krodal and by Jeff Rowberg. However in the latter one the error is of MPU 6050 connection failed. I tried sleep bit disable, power management, pull up resistors fixes but nothing has worked so far. however when I run the i2c scanner program to check 0x68 address values randomly switch between 0x68 and 0x69.

 

 

Further when I loaded the arduino with the krodal's program I get Read accel, temp and gyro ,error 2.

 

I would appreciate if I could get some help and guidance, to know if way I am trying to implement the mentioned codes is correct

 

Regards 

Link to comment
Share on other sites

What breakout board are you using?  Does it have a pin marked AD0?   If so is it connected to either ground or your voltage?

 

It really sounds like your AD0 pin is floating (not connected to ground nor voltage).    That would explain why the I2C address randomly changes because the AD0 pin controls the least significant bit of the I2C address.

 

If AD0 is floating it will sometimes be high and sometimes be low thus your address changes.  Connect it to ground and see if the address keeps changing when you scan.

 

 

Also an error 2 sounds like the error coming back from the Wire library.  Again you would get that error if it could not find the address (returned from Wire.endTransmission());

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...