BNO055¶
- class BNO055.BNO055(i2c, reset_pin)¶
Bases:
object
A driver class for the BNO055 IMU using I2C communication.
- CALIB_DATA_REG = 85¶
- CALIB_STAT_REG = 53¶
- CONFIG_MODE = 0¶
- EULER_H_LSB_REG = 26¶
- GYRO_DATA_LSB_REG = 20¶
- I2C_ADDR = 40¶
- NDOF_MODE = 12¶
- OPR_MODE_REG = 61¶
- get_calibration_status()¶
Reads and returns the IMU calibration status.
- Returns:
A tuple (system, gyroscope, accelerometer, magnetometer) with values 0-3.
- read_angular_velocity()¶
Reads angular velocity data (gyro X, Y, Z).
- Returns:
A tuple (gyro_x, gyro_y, gyro_z) in degrees per second.
- read_euler_angles()¶
Reads and returns Euler angles (heading, roll, pitch) in degrees.
- Returns:
A tuple (heading, roll, pitch) in degrees.
- read_heading()¶
Reads and returns only the heading angle in degrees.
- Returns:
Heading in degrees.
- read_yaw_rate()¶
Reads and returns only the yaw rate from the gyroscope.
- Returns:
Yaw rate in degrees per second.
- reset()¶
Resets the BNO055 using the reset pin.
- set_mode(mode)¶
Set the operation mode with retry on failure.