MPU9250
Fork of MPU6050 by
Diff: MPU6050.cpp
- Revision:
- 7:95e74f827c08
- Parent:
- 6:40ac13ef7290
- Child:
- 9:d879deb55ae1
--- a/MPU6050.cpp Sat Jun 22 11:23:45 2013 +0000 +++ b/MPU6050.cpp Sat Nov 02 17:23:43 2013 +0000 @@ -57,6 +57,11 @@ devAddr = MPU6050_DEFAULT_ADDRESS; } +MPU6050::MPU6050(I2C i2c) : debugSerial(USBTX, USBRX), i2Cdev(i2c) +{ + devAddr = MPU6050_DEFAULT_ADDRESS; +} + /** Specific address constructor. * @param address I2C address * @see MPU6050_DEFAULT_ADDRESS @@ -78,8 +83,8 @@ void MPU6050::initialize() { +#ifdef useDebugSerial debugSerial.baud(921600); //uses max serial speed -#ifdef useDebugSerial debugSerial.printf("MPU6050::initialize start\n"); #endif setClockSource(MPU6050_CLOCK_PLL_XGYRO);