blue mbed code for the BNO055 imu from adafruit

Dependencies:   BNO055 MODSERIAL mbed

Fork of bmbed_lidar_belt by sensory_array

Revision:
19:01d091b38d61
Parent:
17:32b83c5787fc
--- a/main.cpp	Wed Nov 25 23:24:00 2015 +0000
+++ b/main.cpp	Fri Nov 27 18:34:19 2015 +0000
@@ -67,22 +67,27 @@
         imu.get_calib();
     }
     
-    char sendData[1] = {0x00};
+//    char sendData[1] = {0x00};
 
 //    char btData[12] = {'a','b','c','d','e','f','g','\n','\0'};
 
     while (1) {
-        imu.get_angles();
-        float pitch = imu.euler.pitch;
-        pc.printf("%f\n",pitch);
-//        pc.printf("about to send data\n");
+        //imu.get_angles();
+        //float pitch = imu.euler.pitch;
+        //float yaw = imu.euler.yaw;
+        //float roll = imu.euler.roll;
+        //pc.printf("r:%6.2f p:%6.2f y:%6.2f\n",roll, pitch, yaw);
+        imu.get_accel(); //query the i2c device
+        pc.printf("x:%6.2f y:%6.2f z:%6.2f\n",imu.accel.x, imu.accel.y, imu.accel.z);
+//      
+          //pc.printf("about to send data\n");
 //        for(int j=0;j<9;j++){
 //            btData[j] = '\0';
 //            if(bt.writeable())
 //                bt.putc(btData[j]);
 //            //wait(0.001);
 //        }
-        wait(0.5);
+        wait(0.3);
         //pc.printf("finished sending data\n");
     }
 }