example

Dependencies:   CMSIS_DSP_401 MPU9150_DMP QuaternionMath mbed

Fork of MPU9150_Example by Chris Pepper

Files at this revision

API Documentation at this revision

Comitter:
soulx
Date:
Fri Dec 18 21:00:58 2015 +0000
Parent:
0:9f2982964a48
Commit message:
copy mpu9150

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 9f2982964a48 -r 689d7acae311 main.cpp
--- a/main.cpp	Mon Sep 01 14:26:51 2014 +0000
+++ b/main.cpp	Fri Dec 18 21:00:58 2015 +0000
@@ -2,7 +2,7 @@
 #include "Quaternion.h"
 
 Serial debug(USBTX, USBRX);
-MPU9150 imu(p10, p9, p15);
+MPU9150 imu(D15, D14, D2);
 
 DigitalOut led(LED1);
 
@@ -10,11 +10,15 @@
 
 int main(){
     debug.baud(115200);
+    imu.reset();
     
     if(imu.isReady()){
         debug.printf("MPU9150 is ready\r\n");
     } else {
         debug.printf("MPU9150 initialisation failure\r\n");
+        debug.printf("ID 0x%x\r\n",imu.getDeviceID());
+        imu.reset();
+        while(1);
     }
     
     imu.initialiseDMP();
diff -r 9f2982964a48 -r 689d7acae311 mbed.bld
--- a/mbed.bld	Mon Sep 01 14:26:51 2014 +0000
+++ b/mbed.bld	Fri Dec 18 21:00:58 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/0b3ab51c8877
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0
\ No newline at end of file