Skip to content

Conversation

@abdalla1912mohamed
Copy link
Contributor

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.

@kilograham kilograham merged commit 130987d into raspberrypi:master Nov 24, 2024
1 check passed
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.

3 participants