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

Files at this revision

API Documentation at this revision

Comitter:
danmbed
Date:
Fri Mar 05 13:58:00 2021 +0000
Parent:
13:92854c8deb3c
Commit message:
roll and pitch Euler angles corrected

Changed in this revision

BNO055.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 92854c8deb3c -r 9f9a12bcd8ed BNO055.cpp
--- a/BNO055.cpp	Thu Feb 01 00:16:59 2018 +0100
+++ b/BNO055.cpp	Fri Mar 05 13:58:00 2021 +0000
@@ -68,8 +68,8 @@
     _i2c.write(chip_addr, dt, 1, true);
     _i2c.read(chip_addr, dt, 6, false);
     h = dt[1] << 8 | dt[0];
-    p = dt[3] << 8 | dt[2];
-    r = dt[5] << 8 | dt[4];
+    r = dt[3] << 8 | dt[2];
+    p = dt[5] << 8 | dt[4];
 
     if (use_degrees()) {
         result->h = (double)h / 16;