ME 305 Group 6 Documentation
Public Member Functions | List of all members
BNO055.BNO055 Class Reference

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...
 

Detailed Description

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. Documentation for the unit can be found at https://cdn-shop.adafruit.com/datasheets/BST_BNO055_DS000_12.pdf

Constructor & Destructor Documentation

◆ __init__()

def BNO055.BNO055.__init__ (   self,
pyb.I2C  i2c,
  device_addr 
)

Creates a new BNO055 object.

Initialized the BNO055 object with the connected pins.

Parameters
i2ca pyb.I2C object to connect to the BNO055 device
device_addrThe device address (often in hex)

Member Function Documentation

◆ calibration_status()

def BNO055.BNO055.calibration_status (   self)

Returns the calibration status bytes from the IMU.


Returns
Dictionary of calibration status values

◆ change_op_mode()

def BNO055.BNO055.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, NDOF_FMC_OFF_MODE, NDOF_MODE) change the operating mode of the IMU by writing to memory.

Parameters
op_modeThe operating mode constant to set the device in. (IMU_MODE, COMPASS_MODE, M4G_MODE, NDOF_FMC_OFF_MODE, NDOF_MODE)

◆ read_angular_velocity()

def BNO055.BNO055.read_angular_velocity (   self)

Returns the angular velocities from IMU.

Returns the angular velocities from the IMU in degrees per second.

Returns
data A dictionary of angular velocities. No units specified.

◆ read_calib_coeff()

def BNO055.BNO055.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

Returns
Returns calibration coefficients as packed binary data

◆ read_euler_angles()

def BNO055.BNO055.read_euler_angles (   self)

Returns the Euler angles from the IMU.

Returns the Euler angles from the IMU as dictionary

Returns
data A dictionary of Euler angle values converted into degrees.

◆ write_calib_coeff()

def BNO055.BNO055.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

Parameters
dataPacked binary data containing the calibration coefficients for the IMU

The documentation for this class was generated from the following file: