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
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
Diff: BNO055.h
- Revision:
- 7:f0eb18503c27
- Parent:
- 6:07d01bf36ad0
- Child:
- 8:46134e7474e7
diff -r 07d01bf36ad0 -r f0eb18503c27 BNO055.h --- a/BNO055.h Wed Aug 23 09:44:43 2017 +0000 +++ b/BNO055.h Sun Jan 28 19:35:11 2018 +0000 @@ -83,13 +83,7 @@ double x; double y; double z; -} BNO055_LIN_ACC_TypeDef; - -typedef struct { - double x; - double y; - double z; -} BNO055_GRAVITY_TypeDef; +} BNO055_VECTOR_TypeDef; typedef struct { int8_t acc_chip; @@ -161,7 +155,7 @@ /** Get Euler Angles * @param double type of 3D data address */ - void get_Euler_Angles(BNO055_EULER_TypeDef *el); + void get_euler_angles(BNO055_EULER_TypeDef *el); /** Get Quaternion XYZ&W * @param int16_t type of 4D data address @@ -171,12 +165,12 @@ /** Get Linear accel data * @param double type of 3D data address */ - void get_linear_accel(BNO055_LIN_ACC_TypeDef *la); + void get_linear_accel(BNO055_VECTOR_TypeDef *la); /** Get Gravity data * @param double type of 3D data address */ - void get_gravity(BNO055_GRAVITY_TypeDef *gr); + void get_gravity(BNO055_VECTOR_TypeDef *gr); /** Get Chip temperature data both Acc & Gyro * @param int8_t type of data address