I am using the Bosch BNO055 connected to ESP-WROOM-32 board, to collect data from this sensor. However there are some missings in python library for BNO055 that are limiting my progress, which are the linear acceleration and the calibration status.
For linear acceleration, I’ve included it in the library and it’s working. However, the “get_calibration_status” function, I’ve tried include it, but I can not get it to work.
Can anyone help me?
The code I’ve included in library were:
For Linear Acceleration:
“”“Return the current linear acceleration (acceleration from movement,
not from gravity) reading as a tuple of X, Y, Z values in meters/second^2.
x, y, z = self._read_vector(BNO055_LINEAR_ACCEL_DATA_X_LSB_ADDR)
return (x/100.0, y/100.0, z/100.0)For Status Calibration:
# Return the calibration status register value.
cal_status = self._read_byte(BNO055_CALIB_STAT_ADDR)
sys = (cal_status >> 6) & 0x03
gyro = (cal_status >> 4) & 0x03
accel = (cal_status >> 2) & 0x03
mag = cal_status & 0x03
# Return the results as a tuple of all 3 values.
return (sys, gyro, accel, mag)