Skip to content

Commit 42ffd51

Browse files
authored
fix device reset in mpu6050_i2c.c (#319)
To reset the MPU6050, the device_reset bit shall be set to '1'. reference from "MPU-6000/MPU-6050 Register Map and Descriptions" DEVICE_RESET : When set to 1, this bit resets all internal registers to their default values. The bit automatically clears to 0 once the reset is done.
1 parent 92de98a commit 42ffd51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

i2c/mpu6050_i2c/mpu6050_i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static int addr = 0x68;
3737
static void mpu6050_reset() {
3838
// Two byte reset. First byte register, second byte data
3939
// There are a load more options to set up the device in different ways that could be added here
40-
uint8_t buf[] = {0x6B, 0x00};
40+
uint8_t buf[] = {0x6B, 0x80};
4141
i2c_write_blocking(i2c_default, addr, buf, 2, false);
4242
}
4343

0 commit comments

Comments
 (0)