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

Update mpu6050_i2c.c #579

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abdalla1912mohamed
Copy link

Explanation of Changes:
The first part of the function resets the MPU6050 by writing 0x80 to the 0x6B register, which is the reset command. After a short delay (100 ms) to allow the reset to take effect, the second part writes 0x00 to the 0x6B register to clear the sleep mode and wake up the device. A short 10 ms delay is added after clearing the sleep mode to allow the device to stabilize.

Explanation of Changes:
The first part of the function resets the MPU6050 by writing 0x80 to the 0x6B register, which is the reset command.
After a short delay (100 ms) to allow the reset to take effect, the second part writes 0x00 to the 0x6B register to clear the sleep mode and wake up the device.
A short 10 ms delay is added after clearing the sleep mode to allow the device to stabilize.
Copy link
Contributor

@peterharperuk peterharperuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - I believe this example is currently broken and this change fixes it.

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

Successfully merging this pull request may close these issues.

2 participants