library of measure the sensor MPU6050 by I2C
Dependents: 1-K64F_with_5_acel
Fork of MPU6050 by
Revision 3:6d0ea7c8c5c4, committed 2016-12-01
- Comitter:
- vinajarr
- Date:
- Thu Dec 01 08:16:02 2016 +0000
- Parent:
- 2:5c63e20c50f3
- Child:
- 4:52b05c0e09a6
- Commit message:
- change address I2C add fuction for read only accelerometer data
Changed in this revision
MPU6050.cpp | Show annotated file Show diff for this revision Revisions of this file |
MPU6050.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/MPU6050.cpp Mon Sep 10 21:26:25 2012 +0000 +++ b/MPU6050.cpp Thu Dec 01 08:16:02 2016 +0000 @@ -121,9 +121,9 @@ int temp[3]; this->getAcceleroRaw(temp); if (currentAcceleroRange == MPU6050_ACCELERO_RANGE_2G) { - data[0]=(float)temp[0] / 16384.0 * 9.81; - data[1]=(float)temp[1] / 16384.0 * 9.81; - data[2]=(float)temp[2] / 16384.0 * 9.81; + data[0]=(float)temp[0] / 16384.0 ; + data[1]=(float)temp[1] / 16384.0; + data[2]=(float)temp[2] / 16384.0 ; } if (currentAcceleroRange == MPU6050_ACCELERO_RANGE_4G){ data[0]=(float)temp[0] / 8192.0 * 9.81;
--- a/MPU6050.h Mon Sep 10 21:26:25 2012 +0000 +++ b/MPU6050.h Thu Dec 01 08:16:02 2016 +0000 @@ -16,7 +16,7 @@ * Defines */ #ifndef MPU6050_ADDRESS - #define MPU6050_ADDRESS 0x69 // address pin low (GND), default for InvenSense evaluation board + #define MPU6050_ADDRESS 0x68 // address pin low (GND), default for InvenSense evaluation board #endif #ifdef MPU6050_ES