Skip to content
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 reset should write 0xb00000000 to PWR_MGMT_1 instead of just writing 0b1xxxxxxx #373

Open
echoGee opened this issue Apr 24, 2018 · 0 comments

Comments

@echoGee
Copy link

echoGee commented Apr 24, 2018

* @see MPU6050_RA_PWR_MGMT_1
* @see MPU6050_PWR1_DEVICE_RESET_BIT
*/
void MPU6050::reset() {
I2Cdev::writeBit(devAddr, MPU6050_RA_PWR_MGMT_1, MPU6050_PWR1_DEVICE_RESET_BIT, true);
}
/** Get sleep mode status.

should call

    I2Cdev::writeByte(devAddr, MPU6050_RA_PWR_MGMT_1, 0 ) ;

instead, because it seems to be better behaved after a power reset of the microcontroller. Better since,

  1. the i2c bus isn't locked after a uC powercycle
  2. The MPU6050 is able to respond to i2c calls on the address.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant