p kj
/
LPC824-BalanceCar
Microduino
Fork of BalanceCar by
Diff: MPU6050.cpp
- Revision:
- 2:99785a1007a4
- Parent:
- 0:a4d8f5b3c546
diff -r 620da20b810b -r 99785a1007a4 MPU6050.cpp --- a/MPU6050.cpp Sat Jun 04 04:06:36 2016 +0000 +++ b/MPU6050.cpp Tue Jun 07 05:26:03 2016 +0000 @@ -35,12 +35,14 @@ */ #include "MPU6050.h" +extern DigitalOut myled; #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) /** Default constructor, uses default I2C address. * @see MPU6050_DEFAULT_ADDRESS */ MPU6050::MPU6050() { devAddr = MPU6050_DEFAULT_ADDRESS; + //myled = 1; } /** Specific address constructor. @@ -61,6 +63,8 @@ * the default internal clock source. */ void MPU6050::initialize() { + //I2Cdev i2cdev; + I2Cdev::init(); setClockSource(MPU6050_CLOCK_PLL_XGYRO); setFullScaleGyroRange(MPU6050_GYRO_FS_250); setFullScaleAccelRange(MPU6050_ACCEL_FS_2);