Extended and refactored library for BNO055, an intelligent 9-axis absolute orientation sensor by Bosch Sensortec. It includes ACC, MAG and GYRO sensors and Cortex-M0 processor.

Fork of BNO055_fusion by Kenji Arai

Please note: pitch and roll in get_euler_angles are switched, the code should be like this:

h = dt[1] << 8 | dt[0]; r = dt[3] << 8 | dt[2]; p = dt[5] << 8 | dt[4];

See https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bno055-ds000.pdf

Revision:
11:17bc36c5ccbb
Parent:
10:63a9849f0e97
Child:
12:0e81e9aecc4c
--- a/BNO055.h	Sun Jan 28 20:55:10 2018 +0000
+++ b/BNO055.h	Sun Jan 28 21:29:12 2018 +0000
@@ -73,10 +73,10 @@
 } BNO055_EULER_TypeDef;
 
 typedef struct {
-    int16_t x;
-    int16_t y;
-    int16_t z;
-    int16_t w;
+    double x;
+    double y;
+    double z;
+    double w;
 } BNO055_QUATERNION_TypeDef;
 
 typedef struct {
@@ -181,7 +181,7 @@
      * @param double type of 3D data address
      */
     void get_gyro(BNO055_VECTOR_TypeDef *gr);
-    
+
     /** Get Gravity data
      * @param double type of 3D data address
      */
@@ -527,7 +527,7 @@
         if ((d & 0x03) == 0x03){
             break;
         }
-        wait(1.0);   
+        wait(1.0);
     }
     pc.printf("-> Step2) is done\r\n\r\n");
     //---------- Magnetometer Caliblation ---------------------------------------------------------