From d857877ee292202ba3a469b3821561ff0d4218d2 Mon Sep 17 00:00:00 2001 From: kartofen Date: Fri, 16 Feb 2024 18:10:45 +0200 Subject: working gyro and subsystem --- src/main/java/frc/robot/util/IMUGyro.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/frc/robot/util') diff --git a/src/main/java/frc/robot/util/IMUGyro.java b/src/main/java/frc/robot/util/IMUGyro.java index 3860b85..8d41c63 100644 --- a/src/main/java/frc/robot/util/IMUGyro.java +++ b/src/main/java/frc/robot/util/IMUGyro.java @@ -39,15 +39,15 @@ public class IMUGyro mpu = gyro; reset(); - // mpu.write(CONFIG_ADDR, 0b000000); - mpu.write(SMPLRT_DIV, 0b00000010); - // mpu.write(GYRO_CONFIG, 0b00011000); - // mpu.write(ACCL_CONFIG, 0b00000000); + mpu.write(CONFIG_ADDR, 0b00000100); + mpu.write(SMPLRT_DIV, 0b00010011); + mpu.write(GYRO_CONFIG, 0b00011000); + mpu.write(ACCL_CONFIG, 0b00000000); } public void reset() { - mpu.write(PWR_MGMT_1, 0b000001000); + mpu.write(PWR_MGMT_1, 0b00000000); pitch = 0; roll = 0; -- cgit v1.2.3