Mohamed Ashraf / MPU6050-DMP

Dependents:   MPU6050DMPV2

Revision:
6:748bae310e1e
Parent:
3:25e1a5a10e53
--- a/MPU6050.cpp	Sat Nov 23 16:47:00 2013 +0000
+++ b/MPU6050.cpp	Thu Dec 03 02:23:23 2015 +0000
@@ -42,7 +42,7 @@
 
 #include "MPU6050.h"
 
-#define useDebugSerial
+//#define useDebugSerial
 
 //instead of using pgmspace.h
 typedef const unsigned char prog_uchar;
@@ -52,7 +52,7 @@
 /** Default constructor, uses default I2C address.
  * @see MPU6050_DEFAULT_ADDRESS
  */
-MPU6050::MPU6050() : debugSerial(USBTX, USBRX)
+MPU6050::MPU6050(PinName i2cSda, PinName i2cScl) : debugSerial(USBTX, USBRX), i2Cdev(i2cSda,i2cScl)
 {
     devAddr = MPU6050_DEFAULT_ADDRESS;
 }
@@ -63,7 +63,7 @@
  * @see MPU6050_ADDRESS_AD0_LOW
  * @see MPU6050_ADDRESS_AD0_HIGH
  */
-MPU6050::MPU6050(uint8_t address) : debugSerial(USBTX, USBRX)
+MPU6050::MPU6050(PinName i2cSda, PinName i2cScl, uint8_t address) : debugSerial(USBTX, USBRX), i2Cdev(i2cSda,i2cScl)
 {
     devAddr = address;
 }