Lib for MPU9150/9250 IMU sensors

Dependents:   DISCO-F746NG_rtos_test

Fork of MPU9150 by Johannes Stratmann

Files at this revision

API Documentation at this revision

Comitter:
TuxLeon
Date:
Sun Feb 11 18:31:53 2018 +0000
Parent:
0:ab00d9bcd00d
Commit message:
First commit

Changed in this revision

MPU9150.cpp Show annotated file Show diff for this revision Revisions of this file
MPU9150.h Show annotated file Show diff for this revision Revisions of this file
diff -r ab00d9bcd00d -r c38eb550c82e MPU9150.cpp
--- a/MPU9150.cpp	Mon Apr 24 16:21:35 2017 +0000
+++ b/MPU9150.cpp	Sun Feb 11 18:31:53 2018 +0000
@@ -72,7 +72,7 @@
  * @return True if connection is valid, false otherwise
  */
 bool MPU9150::testConnection() {
-    return getDeviceID() == 0x34;
+    return getDeviceID() == 0x39;
 }
 
 // AUX_VDDIO register (InvenSense demo code calls this RA_*G_OFFS_TC)
diff -r ab00d9bcd00d -r c38eb550c82e MPU9150.h
--- a/MPU9150.h	Mon Apr 24 16:21:35 2017 +0000
+++ b/MPU9150.h	Sun Feb 11 18:31:53 2018 +0000
@@ -37,6 +37,7 @@
 #ifndef _MPU9150_H_
 #define _MPU9150_H_
 
+#include "mbed.h"
 #include "I2Cdev.h"
 
 // supporting link:  http://forum.arduino.cc/index.php?&topic=143444.msg1079517#msg1079517
@@ -416,9 +417,10 @@
 
 // note: DMP code memory blocks defined at end of header file
 
+
 class MPU9150 {
 	private:
-        I2Cdev &i2Cdev;
+        I2Cdev i2Cdev;
         //Serial debugSerial;
 
     public: