Introduction
Dependencies
This driver depends on the Register and Bus Device libraries. Please ensure they are also available on the CircuitPython filesystem. This is easily achieved by downloading a library and driver bundle.
Installing from PyPI
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:
pip3 install adafruit-circuitpython-bno055
To install system-wide (this may be required in some cases):
sudo pip3 install adafruit-circuitpython-bno055
To install in a virtual environment in your current project:
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-bno055
Usage Notes
Of course, you must import the library to use it:
import adafruit_bno055
This driver takes an instantiated and active I2C object as an argument to its constructor. The way to create an I2C object depends on the board you are using. For boards with labeled SCL and SDA pins, you can:
import board
i2c = board.I2C()
Once you have the I2C object, you can create the sensor object:
sensor = adafruit_bno055.BNO055_I2C(i2c)
And then you can start reading the measurements:
print(sensor.temperature)
print(sensor.euler)
print(sensor.gravity)
Documentation
API documentation for this library can be found on Read the Docs.
For information on building library documentation, please check out this guide.
Contributing
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
Table of Contents
API Reference
adafruit_bno055
BNO055
BNO055.accel_bandwidth
BNO055.accel_mode
BNO055.accel_range
BNO055.acceleration
BNO055.axis_remap
BNO055.calibrated
BNO055.calibration_status
BNO055.euler
BNO055.external_crystal
BNO055.gravity
BNO055.gyro
BNO055.gyro_bandwidth
BNO055.gyro_mode
BNO055.gyro_range
BNO055.linear_acceleration
BNO055.magnet_mode
BNO055.magnet_operation_mode
BNO055.magnet_rate
BNO055.magnetic
BNO055.mode
BNO055.CONFIG_MODE
BNO055.ACCONLY_MODE
BNO055.MAGONLY_MODE
BNO055.GYRONLY_MODE
BNO055.ACCMAG_MODE
BNO055.ACCGYRO_MODE
BNO055.MAGGYRO_MODE
BNO055.AMG_MODE
BNO055.IMUPLUS_MODE
BNO055.COMPASS_MODE
BNO055.M4G_MODE
BNO055.NDOF_FMC_OFF_MODE
BNO055.NDOF_MODE
BNO055.quaternion
BNO055.set_normal_mode()
BNO055.set_suspend_mode()
BNO055.temperature
BNO055.use_external_crystal
BNO055_I2C
BNO055_UART
Related Products