example

Dependencies:   CMSIS_DSP_401 MPU9150_DMP QuaternionMath mbed

Fork of MPU9150_Example by Chris Pepper

Revision:
1:689d7acae311
Parent:
0:9f2982964a48
--- 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();