ME 305 Group 6 Documentation
|
A class to represent a BNO055 IMU. More...
Public Member Functions | |
def | __init__ (self, pyb.I2C i2c, device_addr) |
Creates a new BNO055 object. More... | |
def | calibration_status (self) |
Returns the calibration status bytes from the IMU. More... | |
def | change_op_mode (self, op_mode) |
Changes the operation mode to one of many fusion modes. More... | |
def | read_calib_coeff (self) |
Returns the calibration coefficients of the IMU. More... | |
def | write_calib_coeff (self, data) |
Writes the packed binary calibration coefficients to the IMU. More... | |
def | read_euler_angles (self) |
Returns the Euler angles from the IMU. More... | |
def | read_angular_velocity (self) |
Returns the angular velocities from IMU. More... | |
A class to represent a BNO055 IMU.
Objects of this class can modify fusion modes of IMU, retrieve calibration status from the IMU, write/retrieve calibration coefficients, read Euler angles, and read angular velocity from the IMU.
def BNO055_05.BNO055_05.__init__ | ( | self, | |
pyb.I2C | i2c, | ||
device_addr | |||
) |
Creates a new BNO055 object.
Initialized the BNO055 object with the connected pins.
i2c | a pyb.I2C object to connect to the BNO055 device |
device_addr | The device address (often in hex) |
def BNO055_05.BNO055_05.calibration_status | ( | self | ) |
Returns the calibration status bytes from the IMU.
def BNO055_05.BNO055_05.change_op_mode | ( | self, | |
op_mode | |||
) |
Changes the operation mode to one of many fusion modes.
By passing an operation mode constant (IMU_MODE, COMPASS_MODE, M4G_MODE, MDOF_FMC_OFF_MODE, MDOF_MODE) change the operating mode of the IMU by writing to memory.
op_mode | The operating mode constant to set the device in. (IMU_MODE, COMPASS_MODE, M4G_MODE, MDOF_FMC_OFF_MODE, MDOF_MODE) |
def BNO055_05.BNO055_05.read_angular_velocity | ( | self | ) |
Returns the angular velocities from IMU.
Returns the angular velocities from the IMU in degrees per second.
def BNO055_05.BNO055_05.read_calib_coeff | ( | self | ) |
Returns the calibration coefficients of the IMU.
Returns the calibration coefficients of the IMU as an array of packed binary data
def BNO055_05.BNO055_05.read_euler_angles | ( | self | ) |
Returns the Euler angles from the IMU.
Returns the Euler angles from the IMU as dictionary
def BNO055_05.BNO055_05.write_calib_coeff | ( | self, | |
data | |||
) |
Writes the packed binary calibration coefficients to the IMU.
Takes calibration coefficients passed as data as an argument and writes to the IMU
data | Packed binary data containing the calibration coefficients for the IMU |