Evan Brown
/
APpart3_E_start
11/18
Diff: sensor_fusion.h
- Revision:
- 2:a4d5e7f96e87
- Parent:
- 1:491bd986ce22
--- a/sensor_fusion.h Sat Nov 10 00:23:07 2018 +0000 +++ b/sensor_fusion.h Thu Nov 15 01:36:16 2018 +0000 @@ -22,12 +22,12 @@ #define CONFIG 0x1A //the IMU config register #define GYRO_CONFIG 0x1B //the gyroscope config register #define ACCEL_CONFIG 0x1C //the accelerometer config register -#define GYRO_X 0x44 //the register that stores the first bit of the gyroscope x value -#define GYRO_Y 0x46 -#define GYRO_Z 0x48 -#define ACCEL_X 0x3C //the register that stores the first bit of the accelerometer x value -#define ACCEL_Y 0x3E -#define ACCEL_Z 0x40 +#define GYRO_X 0x43 //the register that stores the first bit of the gyroscope x value +#define GYRO_Y 0x45 +#define GYRO_Z 0x47 +#define ACCEL_X 0x3B //the register that stores the first bit of the accelerometer x value +#define ACCEL_Y 0x3D +#define ACCEL_Z 0x3F class MPU6050 { @@ -78,7 +78,7 @@ * * Returns true upon success, and false upon failure. */ - bool write_reg(int addr, int reg, char buf); + bool write_reg(int addr, char reg, char buf); /** * Reads data from a specific address @@ -90,7 +90,7 @@ * * Returns true upon success, and false upon failure. */ - bool read_reg(char addr, char reg, char *buf, int length); + bool read_reg(int addr, char reg, char *buf, int length); }; #endif