Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: MPU6050.cpp
- Revision:
- 3:3c0727618a3b
- Parent:
- 2:e2081d9de7af
- Child:
- 4:df70fe9d6635
--- a/MPU6050.cpp Wed Feb 01 11:09:14 2017 +0000
+++ b/MPU6050.cpp Wed Aug 23 17:25:27 2017 +0000
@@ -62,9 +62,13 @@
float aRes;
float gRes;
int Ascale = AFS_2G;
+
+//int16_t ax,ay,az;
+//int16_t gx,gy,gz;
+
float ax,ay,az;
-float gx,gy,gz;
-#define useDebugSerial
+float gx,gy,gz;
+//#define useDebugSerial
//instead of using pgmspace.h
typedef const unsigned char prog_uchar;
@@ -74,7 +78,7 @@
/** Default constructor, uses default I2C address.
* @see MPU6050_DEFAULT_ADDRESS
*/
-MPU6050::MPU6050() : debugSerial(p30, p31)
+MPU6050::MPU6050()
{
devAddr = MPU6050_DEFAULT_ADDRESS;
}
@@ -85,7 +89,7 @@
* @see MPU6050_ADDRESS_AD0_LOW
* @see MPU6050_ADDRESS_AD0_HIGH
*/
-MPU6050::MPU6050(uint8_t address) : debugSerial(p30, p31)
+MPU6050::MPU6050(uint8_t address)
{
devAddr = address;
}
@@ -138,6 +142,7 @@
setFullScaleGyroRange(MPU6050_GYRO_FS_250);
setFullScaleAccelRange(MPU6050_ACCEL_FS_2);
setSleepEnabled(false); // thanks to Jack Elston for pointing this one out!
+
#ifdef useDebugSerial
debugSerial.printf("MPU6050::initialize end\n");