Copy of MPU6050

Dependents:   Rotation_test

Fork of MPU6050 by Erik -

Files at this revision

API Documentation at this revision

Comitter:
majik
Date:
Sun Dec 01 06:20:11 2013 +0000
Parent:
2:5c63e20c50f3
Commit message:
No changes

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
diff -r 5c63e20c50f3 -r 16cb051b0702 MPU6050.cpp
--- a/MPU6050.cpp	Mon Sep 10 21:26:25 2012 +0000
+++ b/MPU6050.cpp	Sun Dec 01 06:20:11 2013 +0000
@@ -45,10 +45,11 @@
     this->write(MPU6050_PWR_MGMT_1_REG, temp);
 }
 
-bool MPU6050::testConnection( void ) {
+char MPU6050::testConnection( void ) {
     char temp;
     temp = this->read(MPU6050_WHO_AM_I_REG);
-    return (temp == (MPU6050_ADDRESS & 0xFE));
+    //return (temp == (MPU6050_ADDRESS & 0xFE));
+    return temp;
 }
 
 void MPU6050::setBW(char BW) {
@@ -234,4 +235,3 @@
     retval=(retval+521.0)/340.0+35.0;
     return retval;
 }
-
diff -r 5c63e20c50f3 -r 16cb051b0702 MPU6050.h
--- a/MPU6050.h	Mon Sep 10 21:26:25 2012 +0000
+++ b/MPU6050.h	Sun Dec 01 06:20:11 2013 +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
@@ -99,7 +99,7 @@
      *
      * @return True for a working connection, false for an error
      */     
-     bool testConnection( void );
+     char testConnection( void );
      
      /**
      * Sets the bandwidth of the digital low-pass filter