# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/095/533/medium800/sensors__editiso.png?1602263520)

Here it is, the motion sensor you were looking for: the one that just gives you the directly usable information without requiring you to first consult with a PhD to learn the arcane arts of **Sensor Fusion**. The BNO085 takes the life's work of multiple people who have spent their entire career focused on how to get useful information from direct motion sensor measurements and then squeezes that information down into a 5.2x3.8mm box, along with the sensors to go along with it.

The BNO085 by the motion sensing experts at **Hillcrest Laboratories** takes the familiar 3-axis accelerometers, gyroscopes, and magnetometers and packages then alongside an Arm Cortex M0 processor running Hillcrest's SH-2 firmware that handles the work of reading the sensors, fusing the measurements into data that you can use directly, and packaging that data and delivering it to you. If the name and description of the BNO085 sounds strikingly similar to those of the BNO055 by Bosch Sensortec, there is a good reason why: they're the same thing, but also they're not. Thanks to a unique agreement between Bosch and Hillcrest, the BNO085 uses the _ **same&nbsp;hardware** _ as the BNO055 but _ **very** _ **_different firmware_** running on it.

Warning: 

"How different?" you might ask. Well my friend, pull up a chair and grab a box of popcorn because it's quite a list. First let's list the similarities. The BNO055 and BNO085 can both deliver the following types of sensor data and sensor fusion products:

- **Acceleration Vector / Accelerometer**  
Three axes of acceleration (gravity + linear motion) in m/s^2
- **Angular Velocity Vector / Gyro**  
Three axes of 'rotation speed' in rad/s
- **Magnetic Field Strength Vector / Magnetometer**  
Three axes of magnetic field sensing in micro Tesla (uT)
- **Linear Acceleration Vector**  
Three axes of linear acceleration data (acceleration minus gravity) in m/s^2
- **Gravity Vector**  
Three axes of gravitational acceleration (minus any movement) in m/s^2
- **Absolute Orientation / Rotation Vector**  
Four-point quaternion output for accurate data manipulation

![](https://cdn-learn.adafruit.com/assets/assets/000/095/532/medium800/sensors__editkit.png?1602263514)

Thanks to the sensor fusion and signal processing wizards from Hillcrest, with the BNO085 you also get:

- **Application Optimized Rotation Vectors**   
For AR/VR, low latency, and low power consumption
- **Additional Base Sensor Reports**  
Separate and simultaneous outputs of Calibrated, Uncalibrated + Correction, and Raw ADC outputs for the Accelerometer, Gyro, and Magnetometer
- **Detection and Classification reports:**  

  - Stability Detection and Classification
  - Significant Motion Detector
  - Tap, Step, and Shake Detectors
  - Activity Classification

As if the above wasn't enough, the BNO085 also provides an impressive suite of detection and classification products by further analyzing the measured motion:

- Stability Detection and Classification
- Tap Detector
- Step Detector
- Step Counter
- Activity Classification
- Significant Motion Detector
- Shake Detector

More information about the various report types is available on the[Report Types](https://learn.adafruit.com/adafruit-9-dof-orientation-imu-fusion-breakout-bno085/report-types) page

## A firehose of information in a human-friendly package

The BNO085 is a supremely capable sensor, practically overflowing with useful information. It is also very small. As the [Ideal Gas Law](https://en.wikipedia.org/wiki/Ideal_gas_law) tells us, when you shove a lot of stuff into a small space, things are going to get a bit spicy. Worry not fellow scientist, we here at Adafruit have done our part to make the BNO085 as approachable as possible. It's a pretty familiar recipe:  
  
Take the following and mix in Eagle CAD:

- One part raw unprocessed Hillcrest Labs brand BNO085
- One voltage regulator for flexible input voltage
- One part Level shifting circuitry for use with 3.3V (RPi/Feather) or 5V(Arduino) logic levels
- Two handy dandy Stemma QT connectors for solderless connection
- One, 32.768kHz crystal to provide a stable reference oscillation
- One breakout PCB with breadboard friendly headers

&nbsp;  
Prepare in the pick and place and bake in a reflow oven on High for about 5 minutes and you get the Adafruit BNO085 IMU breakout.

![](https://cdn-learn.adafruit.com/assets/assets/000/095/534/medium800/sensors__editback.png?1602263535)

With the physical hardware tamed and made approachable, that leaves the software. If it wasn't already very obvious, the BNO085 can generate a wide selection of data and as a result, it has a slightly complex and unique way of delivering that information. To save you the effort of figuring out how to decode and organize all those measurements, we've written libraries for you to use with CircuitPython and Arduino. Just plug in the sensor to your favorite device using our wiring examples, and install the library for your chosen platform and you're ready to start building your very own Robot Friend.

As an alternative to the cornucopia of vectors and classifications that the standard sensor hub modes provide, the BN0085 also provides a simple but useful and well executed UART-based mode that provides calibrated heading and acceleration measurements. The **UART-RVC** mode takes its acronym from one of its potential applications: **Robot Vacuum Cleaner** s. This mode is exceedingly simple to interface with, and based on my limited testing, it performs astoundingly well. The ease of use to utility ratio here is off the charts.  
  
We've written libraries for the UART RVC mode for both Arduino and CircuitPython/Python. Check out the UART RVC pages for [Arduino](https://learn.adafruit.com/adafruit-9-dof-orientation-imu-fusion-breakout-bno085/uart-rvc-for-arduino) and [Python](https://learn.adafruit.com/adafruit-9-dof-orientation-imu-fusion-breakout-bno085/uart-rvc-python) for wiring diagrams and example code

![](https://cdn-learn.adafruit.com/assets/assets/000/095/531/medium800/sensors__editqt.png?1602263501)

# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/095/538/medium800/sensors__edittop-2.png?1602263691)

## **Power Pins**

- **VIN** - this is the power pin. Since the sensor chip uses 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V microcontroller like Arduino, use 5V
- **3Vo** &nbsp;- this is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like
- **GND** - common ground for power and logic

## **I2C Logic Pins**

- **SCL** - I2C clock pin, connect to your microcontroller I2C clock line. This pin is level shifted so you can use 3-5V logic, and there's a **10K pullup** on this pin.
- **SDA** - I2C data pin, connect to your microcontroller I2C data line. This pin is level shifted so you can use 3-5V logic, and there's a **10K pullup** on this pin.  

**Optional:**

- [**STEMMA QT**](https://learn.adafruit.com/introducing-adafruit-stemma-qt) **-** A solderless alternative to the Vin, GND, SCL, and SDA pins. These connectors allow you to connectors to dev boards with&nbsp; **STEMMA QT** connectors and [various associated accessories](https://www.adafruit.com/?q=JST%20SH%204)
- **DI** &nbsp;- **I2C Address pin**. Pulling this pin high will change the I2C address from **0x4A** &nbsp;to&nbsp; **0x4B**

## **UART Logic Pins**

- **SCL** - UART data IN to sensor - Connect to your **microcontroller TX** pin
- **SDA -** UART data OUT from sensor **-** Connect to your **microcontroller RX** pin

## **SPI Logic pins:**

- **SCL** - This is _also_&nbsp;the **S** PI **C** loc **k** pin / **SCK** , it's an input to the chip
- **SDA** - Doubles as the **D** ata **O** ut / **M** icrocontroller **I** n **S** ensor **O** ut&nbsp;/ **MISO** pin, for data sent from the BNO08x 
- **DI** - **D** atal&nbsp; **I** n / **M** icrocontroller **O** ut **S** ensor **I** n&nbsp;/ **MOSI** pin, for data sent from your processor to the BNO08x
- **CS** - this is the **C** hip **S** elect pin, pull it low to start an SPI transaction. It's an input to the chip
- **INT - Interrupt- Active Low.** Indicates that the BNO085 needs the host's attention. **Required** for stable SPI operation
- **RST- Reset- Active Low -** Pull low to GND to reset the sensor. **Required** for stable SPI operation

![](https://cdn-learn.adafruit.com/assets/assets/000/095/537/medium800/sensors_pinouts_back.png?1602263636)

## **Other Pins**

- **P0/P1 Pins** and **Solder Jumpers -** Mode select. Use these pins to set the BNO085's operating mode according to the table below. Both pins are pulled low by default, defaulting to I2C
- **RST-&nbsp;** Reset, **Active Low**. Pull low to GND to reset the sensor
- **INT -&nbsp;** Interrupt/Data Ready- **Active Low** pin. Indicates that the BNO085 needs the host's attention
- **BT-** Bootloader pin used to put the sensor in bootloader. **EXPERT USERS&nbsp;** should consult the datasheet for more information. If you don't know what this you probably want to just leave it be or risk damaging your sensor

&nbsp;

# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## Arduino

Using the BNO08x with Arduino is a simple matter of wiring up the sensor to your Arduino-compatible microcontroller, installing the [Adafruit BNO08x](https://github.com/adafruit/Adafruit_BNO08x) library, and running the provided example code.

Warning: The BNO08x Arduino library only supports a *single* BNO08x sensor.

Warning: 

Warning: 

Info: 

## **I2C Wiring**

Use this wiring if you want to connect via I2C interface. The default I2C address for the BNO08x is **0x4A** but it can be switched to **0x4B** by pulling the **DI** pin high to VCC.&nbsp;

Here is how to wire up the sensor using one of the [**STEMMA QT**](https://learn.adafruit.com/introducing-adafruit-stemma-qt) connectors. The examples show a Metro but wiring will work the same for an Arduino or other compatible board.

- Connect **board VIN (red wire)** to **Board 3V&nbsp;**
- Connect **board GND (black wire)&nbsp;**to&nbsp; **Board**  **GND**
- Connect **board SCL (yellow wire)&nbsp;**to **Board** &nbsp; **SCL**
- Connect **board SDA (blue wire)&nbsp;**to **Board** &nbsp; **SDA**

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/950/medium640/sensors_image.png?1600803606)

Here is how to wire the sensor to a board using a solderless breadboard:

- Connect **board VIN (red wire)** to **Board 3V&nbsp;**
- Connect **board GND (black wire)&nbsp;**to&nbsp; **Board**  **GND**
- Connect **board SCL (yellow wire)&nbsp;**to **Board** &nbsp; **SCL**
- Connect **board SDA (blue wire)&nbsp;**to **Board** &nbsp; **SDA**

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/951/medium640/sensors_image.png?1600803661)

## UART Wiring
- **BNO085 Vin** to the power supply, using the same logic level as your microcontroller. For the Metro M4 shown that is 3.3V, however check your board's documentation to be sure
- **BNO085 GND** to **board GND**
- **BNO085 SCL** to **board TX**
- **BNO085 SDA t** o **board RX**
- **BNO085 P1 to Board Power supply**

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/963/medium640/sensors_image.png?1600803906)

## SPI Wiring
Finally for SPI we are using a Feather M4 for the wiring diagram to make it easier to read. If using an Arduino compatible or other different shaped board, you will still connect to the same pin names to ensure that you use hardware SPI

- BNO085 **Vin** to 3V on the Feather M4
- BNO085 **GND** to common power/data **ground**
- BNO085 **SCL** to the SPI S **CK** pin on the Feather M4
- BNO085&nbsp; **SDA** pin to the SPI **MISO** pin on the Feather M4
- BNO085 **DI** &nbsp; to&nbsp; the **SPI MOSI** pin on the Feather M4
- BNO085 **CS** to pin **#10** on the Feather M4
- BNO085 **INT** to pin **#9** on the Feather M4
- BNO085 **RST** to pin **#5** on the Feather M4
- BNO085 **P0 and P1** to 3V on the Feather M4

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/984/medium640/sensors_image.png?1600805805)

Warning: 

## **Library Installation**

You can install the **Adafruit BNO08x l** ibrary for Arduino using the Library Manager in the Arduino IDE.

![](https://cdn-learn.adafruit.com/assets/assets/000/094/859/medium800/sensors_a_ARDUINO_-_library_manager_menu.png?1600472277)

Click the&nbsp; **Manage Libraries ...** menu item, search for **Adafruit BNO08x** ,&nbsp;and select the&nbsp; **Adafruit BNO08x** &nbsp;library:

![](https://cdn-learn.adafruit.com/assets/assets/000/095/019/medium800/sensors_image.png?1600899879)

Follow the same process for the&nbsp; **Adafruit BusIO** &nbsp;library.

![](https://cdn-learn.adafruit.com/assets/assets/000/095/003/medium800/sensors_aa_ARDUINO-_BusIO_Lib_Manager.png?1600822609)

## **Load Example**
Info: 

Open up&nbsp; **File -\> Examples -\> Adafruit BNO08x -\> rotation\_vector**

After opening the demo file, upload the compiled code to your Arduino wired up to the sensor. Once you upload the code, you will see the **rotation vector quaternion** &nbsp;values being printed when you open the Serial Monitor ( **Tools-\>Serial Monitor** ) at **115200 baud** , similar to this:

## **Example Code**
![](https://cdn-learn.adafruit.com/assets/assets/000/094/989/medium800/sensors_image.png?1600814529)

https://github.com/adafruit/Adafruit_BNO08x/blob/master/examples/rotation_vector/rotation_vector.ino

# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## UART-RVC for Arduino

## **Library Installation**

You can install the **Adafruit BNO08x RVC l** ibrary for Arduino using the Library Manager in the Arduino IDE.

![](https://cdn-learn.adafruit.com/assets/assets/000/095/002/medium800/sensors_a_ARDUINO_-_library_manager_menu.png?1600822549)

Click the&nbsp; **Manage Libraries ...** menu item, search for **Adafruit BNO08x RVC** ,&nbsp;and select the&nbsp; **Adafruit BNO08x RVC** library:

![](https://cdn-learn.adafruit.com/assets/assets/000/095/020/medium800/sensors_image.png?1600899981)

## UART RVC Wiring

Wiring up the BNO085 in UART RVC is similar to UART, but with one less wire!

- **Board 3V** &nbsp;to BNO085 **Vin** (Red Wire).&nbsp;
- **Board GND** to BNO085 **GND** (Black Wire)
- **Board RX** to BNO085 **SDA** (Blue Wire)
- **Board 3V** &nbsp;to BNO085 **P0** (Purple Wire

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/973/medium640/sensors_image.png?1600824680)

Info: 

## **Load Example - Serial Console**
Open up&nbsp; **File -\> Examples -\> Adafruit BNO08x RVC-\> uart\_rvc**

After opening the demo file, upload to your Arduino wired up to the sensor. Once you upload the code, you will see the **heading principal axes and acceleration** &nbsp;values being printed when you open the Serial Monitor ( **Tools-\>Serial Monitor** ) at **115200 baud** , similar to this:

![](https://cdn-learn.adafruit.com/assets/assets/000/095/001/medium800/sensors_image.png?1600822411)

## **Load Example - Serial Plotter**

In addition to the text based example code shown above, we have also included a version that is formatted to display nicely in the Arduino Serial Plotter.

Open up&nbsp; **File -\> Examples -\> Adafruit BNO08x RVC-\> uart\_rvc\_plotter**

After opening the demo file, upload to your Arduino wired up to the sensor. Once you upload the code, open the Serial Plotter ( **Tools-\>Serial Plotter** ) at **115200** baud and you will see graphs of the heading and acceleration like these:

&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/095/004/medium800/sensors_image.png?1600823222)

Play around with it! Move the sensor around and see how rolling back and forth, front to back, and twisting change the graphs. I think you'll be pleasantly surprised!

https://github.com/adafruit/Adafruit_BNO08x_RVC/blob/master/examples/uart_rvc/uart_rvc.ino

![](https://cdn-learn.adafruit.com/assets/assets/000/095/541/medium800thumb/sensors_Gimbal_3_axes_rotation.jpg?1602265511 By Lookang many thanks to Fu-Kwun Hwang and author of Easy Java Simulation = Francisco Esquembre - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=15837410)

# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## Arduino Docs

# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## Arduino UART RVC Docs

# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## Python & CircuitPython

It's easy to use the **BNO08x** with Python or CircuitPython, and the [Adafruit CircuitPython BNO08x](https://github.com/adafruit/Adafruit_CircuitPython_BNO08x) module. This module allows you to easily write Python code that reads motion data from the **BNO08x** sensor.

You can use this sensor with any CircuitPython microcontroller board or with a computer that has GPIO and Python [thanks to Adafruit\_Blinka, our CircuitPython-for-Python compatibility library](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

Warning: 

## **CircuitPython I2C Wiring**

First wire up a BNO08x to your board exactly as shown below. Here's an example of wiring a Feather M4 to the sensor with I2C using one of the handy [**STEMMA QT**](https://learn.adafruit.com/introducing-adafruit-stemma-qt) connectors:

- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire)**
- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Board SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire)**
- **Board SDA** &nbsp;to&nbsp;**sensor SDA (blue wire)**

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/990/medium640/sensors_image.png?1600815557)

You can also use the standard **0.100"/2.54mm pitch** headers to wire it up on a breadboard:

- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire)**
- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Board SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire)**
- **Board SDA** &nbsp;to&nbsp;**sensor SDA (blue wire)**

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/953/medium640/sensors_image.png?1600815049)

## CircuitPython UART Wiring

If you wish to use UART, you can enable the UART mode by pulling the P1 pin high and connecting the sensor to your RX and TX pins:

- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire)**
- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Board TX** &nbsp;to&nbsp;**sensor SCL (yellow wire)**
- **Board RX** &nbsp;to&nbsp;**sensor SDA (blue wire)**
- **Board 3V** &nbsp;to&nbsp;**sensor P1 (purple wire)**  

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/952/medium640/sensors_image.png?1600815713)

## **Python Computer Wiring**

Since there's _dozens_ of Linux computers/boards you can use, we will show wiring for Raspberry Pi. For other platforms, [please visit the guide for CircuitPython on Linux to see whether your platform is supported](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).&nbsp;

Here's the Raspberry Pi wired to the sensor using I2C and a [**STEMMA QT**](https://learn.adafruit.com/introducing-adafruit-stemma-qt) connector:

- **Pi 3V** &nbsp;to&nbsp;**sensor VCC (red wire)**
- **Pi GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Pi SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire)**
- **Pi SDA** &nbsp;to&nbsp;**sensor SDA (blue wire)**

![sensors_stemma-circuit.png](https://cdn-learn.adafruit.com/assets/assets/000/129/454/medium640/sensors_stemma-circuit.png?1713796451)

Finally here is an example of how to wire up a Raspberry Pi to the sensor using a solderless breadboard

- **Pi 3V** &nbsp;to&nbsp;**sensor VCC (red wire)**
- **Pi GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Pi SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire)**
- **Pi SDA** &nbsp;to&nbsp;**sensor SDA (blue wire)**

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/991/medium640/sensors_image.png?1600816316)

Danger: NOTE: The BNO085 seems to work best on the Raspberry Pi with an I2C clock frequency of 400kHz. You can make that change by adding this line to your /boot/config.txt file:

```none
dtparam=i2c_arm_baudrate=400000
```

and then rebooting.

## Python UART Wiring

If you wish to use UART, you can enable the UART mode by pulling the P1 pin high and connecting the sensor to your RX and TX pins:

- **Pi 3V3** &nbsp;to&nbsp;**sensor VIN (red wire)**
- **Pi GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Pi TX** &nbsp;to&nbsp;**sensor SCL (yellow wire)**
- **Pi RX** &nbsp;to&nbsp;**sensor SDA (blue wire)**
- **Pi 3V3** to&nbsp;**sensor P1 (purple wire)**

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/993/medium640/sensors_image.png?1600817088)

## **CircuitPython Installation of BNO08x Library**

You'll need to install the [Adafruit CircuitPython BNO08x](https://github.com/adafruit/Adafruit_CircuitPython_BNO08x) library on your CircuitPython board.

First make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

Next you'll need to install the necessary libraries&nbsp;to use the hardware--carefully follow the steps to find and install these libraries from&nbsp;[Adafruit's CircuitPython library bundle](https://circuitpython.org/libraries).&nbsp; Our CircuitPython starter guide has [a great page on how to install the library bundle](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries).

Before continuing make sure your board's **lib** folder or root filesystem has the **adafruit\_BNO08x** and **adafruit\_bus\_device** folders copied over. Both of these are folders with library files in them. Make sure to copy the whole folder for both into your **lib** folder!

Next&nbsp;[connect to the board's serial REPL&nbsp;](https://learn.adafruit.com/welcome-to-circuitpython/the-repl)so you are at the CircuitPython&nbsp; **\>\>\>** &nbsp;prompt.

## **Python Installation of BNO08x Library**

You'll need to install the **Adafruit\_Blinka** library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3.&nbsp;[Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Once that's done, from your command line run the following command:

- `sudo pip3 install adafruit-circuitpython-bno08x`

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

## **CircuitPython & Python Usage**
Info: 

To demonstrate the usage of the sensor we'll initialize it and enable the&nbsp; **Rotation Vector** report type and display the readings using properties in the CircuitPython REPL

### I2C Initialization

If you are using the I2C connection, run the following code to import the necessary modules and initialize the I2C connection with the sensor:

```python
import time
import board
import busio
import adafruit_bno08x
from adafruit_bno08x.i2c import BNO08X_I2C

i2c = busio.I2C(board.SCL, board.SDA, frequency=800000)
bno = BNO08X_I2C(i2c)
```

![](https://cdn-learn.adafruit.com/assets/assets/000/094/863/medium800/sensors_image.png?1600475125)

### UART Initialization - CircuitPython

If you are using the UART connection with a board (like a Feather) running CircuitPython, create your sensor object as follows:

```python
import adafruit_bno08x
from adafruit_bno08x.uart import BNO08X_UART

import board
import busio
uart = busio.UART(board.TX, board.RX, baudrate=3000000, receiver_buffer_size=2048)

bno = BNO08X_UART(uart)
```

![](https://cdn-learn.adafruit.com/assets/assets/000/094/994/medium800/sensors_image.png?1600818821)

### UART Initialization - Python

Check how you specific board supports UART and where the port entry is created and named. For the Raspberry Pi, this is done using the **pyserial** module and the UART used is `/dev/serial0`. Then you create your sensor object as follows:

```python
import adafruit_bno08x
from adafruit_bno08x.uart import BNO08X_UART

import serial
uart = serial.Serial("/dev/serial0", 115200)

bno = BNO08X_UART(uart)
```

### **Enable the Rotation Vector/Quaternion Report**

Once the connection to the sensor is established we can enable one or more report types and the associated **property**

```python
bno.enable_feature(adafruit_bno08x.BNO_REPORT_ROTATION_VECTOR)
```

![](https://cdn-learn.adafruit.com/assets/assets/000/094/867/medium800/sensors_image.png?1600475703)

Now you're ready to read values from the sensor using the **quaternion** property. This is a 4-tuple of orientation quaternion values.

```python
print("Rotation Vector Quaternion:")
quat_i, quat_j, quat_k, quat_real = bno.quaternion
print(
  "I: %0.6f  J: %0.6f K: %0.6f  Real: %0.6f" % (quat_i, quat_j, quat_k, quat_real)
)
```

![](https://cdn-learn.adafruit.com/assets/assets/000/094/865/medium800/sensors_image.png?1600475526)

## **Example Code**
https://github.com/adafruit/Adafruit_CircuitPython_BNO08x/blob/main/examples/bno08x_simpletest.py

# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## UART-RVC for Python & CircuitPython

![](https://cdn-learn.adafruit.com/assets/assets/000/095/551/medium800/sensors_image.png?1602267137)

## Hardware Setup
The hardware setup for the **UART-RVC** mode should probably be called easyware because of how simple it is. Three wires and a solder jumper (or and additional jumper wire) and you're off to the autonomous vacuum cleaner races.

### UART-RVC Wiring

To allow your device to listen to the heading and acceleration data being output by the BNO085 requires just a few connections. It's similar to the connections for the UART mode, but because there is no software configuration of the BNO085 required, you only need to connect your device's RX pin and pull the **P0** pin high. The TX pin on your device can be left unattached

Here we show the Wiring for a &nbsp;Feather M4 for **CircuitPython** , and a Raspberry Pi for **Python** :

### Feather Wiring
- **Feather 3V** &nbsp;to BNO085 **Vin** (Red Wire).&nbsp;
- **Device GND** to BNO085 **GND** (Black Wire)
- **Device RX** to BNO085 **SDA** (Blue Wire)
- **Feather 3V** &nbsp;to BNO085 **P0** (Purple Wire).&nbsp;

&nbsp;

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/965/medium640/sensors_image.png?1600802094)

### Raspberry Pi Wiring
- **RPi 3V** &nbsp;to BNO085 **Vin** (Red Wire).&nbsp;
- **RPi GND** to BNO085 **GND** (Black Wire)
- **RPi RX** to BNO085 **SDA** (Blue Wire)
- **RPi 3V** &nbsp;to BNO085 **P0** (Purple Wire)

![sensors_image.png](https://cdn-learn.adafruit.com/assets/assets/000/094/966/medium640/sensors_image.png?1600802152)

Info: 

## **CircuitPython Installation of BNO08x\_RVC Library**

You'll need to install the [Adafruit CircuitPython BNO08x RVC](https://github.com/adafruit/Adafruit_CircuitPython_BNO08x_RVC) library on your CircuitPython board.

Follow the instructions on the [Python & CircuitPython page](https://learn.adafruit.com/adafruit-9-dof-orientation-imu-fusion-breakout-bno085/python-circuitpython) for installing CircuitPython and downloading the library bundle

Before continuing make sure your board's **lib** folder or root filesystem has the **adafruit\_BNO08x\_RVC.mpy** file copied over.

&nbsp;

## **Python Installation of BNO08x RVC Library**

Follow the instructions on the [Python & CircuitPython page](https://learn.adafruit.com/adafruit-9-dof-orientation-imu-fusion-breakout-bno085/python-circuitpython) to set up your Raspberry Pi or other SBC and once that's done, from your command line run the following command:

- **sudo pip3 install adafruit-circuitpython-bno08x-rvc**

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

## **CircuitPython & Python Usage**

he following code will walk you through a basic test of the UART RVC mode in the Python REPL

To demonstrate the usage of the sensor setup a UART connection and then we'll initialize the sensor and read the heading and acceleration information from within the board's REPL.

For CircuitPython&nbsp;[connect to the board's serial REPL&nbsp;](https://learn.adafruit.com/welcome-to-circuitpython/the-repl)so you are at the CircuitPython&nbsp; **\>\>\>** prompt. For Python, just type `python` or `python3` to enter the REPL

## UART Initialization - CircuitPython

If you are using the UART connection with a board (like a Feather) running CircuitPython, create your uart object as follows:

```python
import board
import busio
from adafruit_bno08x_rvc import BNO08x_RVC

uart = busio.UART(board.TX, board.RX, baudrate=115200, receiver_buffer_size=2048)
```

![](https://cdn-learn.adafruit.com/assets/assets/000/095/000/medium800/sensors_image.png?1600821965)

## UART Initialization - Python

Check how you specific board supports UART and where the port entry is created and named. For the Raspberry Pi, this is done using the `pyserial` module and the UART used is `/dev/serial0`. Then you create your sensor object as follows:

```python
import serial
uart = serial.Serial("/dev/serial0", 115200)
```

![](https://cdn-learn.adafruit.com/assets/assets/000/094/997/medium800/sensors_image.png?1600821578)

## BNO08x\_RVC creation and usage

Now you're ready to create a `BNO8x_RVC` instance with your UART object and use it to read the heading and acceleration value using the `heading` property:

```python
from adafruit_bno08x_rvc import BNO08x_RVC
rvc = BNO08x_RVC(uart)

yaw, pitch, roll, x_accel, y_accel, z_accel = rvc.heading
print("Yaw: %2.2f Pitch: %2.2f Roll: %2.2f Degrees" % (yaw, pitch, roll))
print("Acceleration X: %2.2f Y: %2.2f Z: %2.2f m/s^2" % (x_accel, y_accel, z_accel))
```

![](https://cdn-learn.adafruit.com/assets/assets/000/094/998/medium800/sensors_image.png?1600821787)

## **Example Code**
https://github.com/adafruit/Adafruit_CircuitPython_BNO08x_RVC/blob/main/examples/bno08x_rvc_simpletest.py

# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## Python Docs

# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## Python UART RVC Docs

# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## Report Types

![](https://cdn-learn.adafruit.com/assets/assets/000/095/542/medium800/sensors_1440px-Apollo_IMU_at_Draper_Hack_the_Moon_exhibit.agr.jpg?1602265834 By ArnoldReinhold - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=82248569)

The BNO085 offers many different reports of sensor and classification data as listed below. Multiple reports can be enabled at the same time, allowing you to compare different results or to provide additional data for your application.

## Motion Vectors
These reports return calibrated X, Y, and Z axis measurements for the given sensor measurement type.&nbsp;

- **Acceleration Vector / Accelerometer**  
Three axes of acceleration from gravity and linear motion, in **m/s<sup>2</sup>**
- **Angular Velocity Vector / Gyro**  
Three axes of rotational speed in **radians per second**
- **Magnetic Field Strength Vector / Magnetometer**  
Three axes of magnetic field sensing in **micro Teslas (uT)**
- **Linear Acceleration Vector**  
Three axes of linear acceleration data with the acceleration from gravity, in **m/s^2**

![](https://cdn-learn.adafruit.com/assets/assets/000/095/545/medium800/sensors_euler.png?1602266096 By Lionel Brits - Hand drawn in Inkscape by me, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=3362239)

## Rotation Vectors

These reports are generated by the BNO085's sensor fusion firmware based on the combination of multiple three-axis motion vectors and are each optimized for different use cases

- **Absolute Orientation/&nbsp; Rotation Vector -** Quaternion  
Optimized for accuracy and referenced to magnetic north and gravity from accelerometer, gyro, and magnetometer data. The data is presented as a four point quaternion output for accurate data manipulation
- **Geomagnetic Rotation Vector** - Quaternion  
Optimized for low power by fusing the accelerometer and magnetometer only, at the cost of responsiveness and accuracy&nbsp;
- **Game Rotation Vecto** r - Quaternion  
Optimized for a smoother gaming experience, fused from the accelerometer and gyro without the magnetometer to avoid sudden jumps in the output from magnetometer based corrections&nbsp;

## Classification Reports

Using its sensor fusion products, the BNO085 can attempt to classify and detect different types of motion it measures. These are pretty neat and work very well when compared similar features found in other 3 or 6-axis motion sensors

- **Stability Classification**  
Uses the accelerometer and gyro to classify the detected motion as "On table", "Stable", or "Motion"
- **Step Counter**  
Based on the data from the step detector, the sensor tracks the number of steps taken, possibly reclassifying previous events based on the patterns detected.
- **Activity Classification**  
Classifies the detected motion as one of several activity types, providing a most likely classification along with confidence levels for the most likely and other motion types.
- **Shake Detector**  
Detects if the sensor has been shaken

![](https://cdn-learn.adafruit.com/assets/assets/000/095/548/medium800/sensors_image.png?1602266635 By Chire - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=17085714)

## Other Motion Reports

The BNO085 also provides raw ADC readings as well as uncorrected measurements for the accelerometer, gyro, and magnetometer.

- **Raw Accelerometer**  
Unscaled direct ADC readings
- **Uncalibrated Gyroscope**  
Angular velocity without bias compensation, with bias separated
- **Raw Gyroscope**  
Unscaled direct ADC readings
- **Uncalibrated Magnetometer**  
Magnetic field measurements without hard iron offset, offset supplied separately
- **Raw Magnetometer**  
Unscaled direct ADC readings

## Additional Reports

There are more (less popular) reports that we don't support at this time, a PR to the libraries is welcome for folks who can implement and test them

- Gravity Vector
- AR/VR stabilized Rotation Vector
- AR/VR stabilized Game rotation vector
- Gyro rotation Vector
- Gyro rotation Vector Prediction
- Significant Motion Detector
- Stability Detection
- Tap Detector
- Step Detector

# Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085

## Downloads

## **Files**

- [BNO08x Datasheet](https://www.ceva-dsp.com/wp-content/uploads/2019/10/BNO080_085-Datasheet.pdf)
- [EagleCAD files on GitHub](https://github.com/adafruit/Adafruit-BNO08x-PCB)
- [3D models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/4754%20BNO085%20STEMMA%20QT)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20BNO085%209-DOF%20Orientation%20IMU%20Fusion.fzpz)

## **Schematic**
![](https://cdn-learn.adafruit.com/assets/assets/000/094/834/medium800/sensors_image.png?1600461991)

## **Fab Print**
![](https://cdn-learn.adafruit.com/assets/assets/000/094/837/medium800/sensors_image.png?1600462366)

## **3D Model**
![](https://cdn-learn.adafruit.com/assets/assets/000/128/506/medium800/sensors_4754_BNO085_STEMMA_QT.jpg?1709563479)


## Featured Products

### Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085 (BNO080)

[Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085 (BNO080)](https://www.adafruit.com/product/4754)
Here it is, the motion sensor you were looking for: the one that just gives you the directly usable information without requiring you to first consult with a PhD to learn the arcane arts of **Sensor Fusion**. The BNO085 takes the life's work of multiple people who have spent...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4754)
[Related Guides to the Product](https://learn.adafruit.com/products/4754/guides)
### STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable

[STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable](https://www.adafruit.com/product/4209)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium Dupont male headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert...

In Stock
[Buy Now](https://www.adafruit.com/product/4209)
[Related Guides to the Product](https://learn.adafruit.com/products/4209/guides)
### JST SH 4-pin Cable with Alligator Clips - STEMMA QT / Qwiic

[JST SH 4-pin Cable with Alligator Clips - STEMMA QT / Qwiic](https://www.adafruit.com/product/4398)
This cable will make it super easy to use our plug-and-play STEMMA QT boards with boards like Circuit Playground. On one end you get a Qwiic / STEMMA QT connector (technically known as a JST SH 4-pin plug)&nbsp; into 4 individual wires with grippy alligator clips. We're carrying these to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4398)
[Related Guides to the Product](https://learn.adafruit.com/products/4398/guides)
### 4-pin JST PH to JST SH Cable - STEMMA to QT / Qwiic

[4-pin JST PH to JST SH Cable - STEMMA to QT / Qwiic](https://www.adafruit.com/product/4424)
Are you a maker in the midst of&nbsp;a [**STEMMA**](https://learn.adafruit.com/introducing-adafruit-stemma-qt/what-is-stemma) dilemma? This 200mm long 4-wire cable is a fantastic chimera-cable fitted with **STEMMA QT / Sparkfun Qwiic JST SH** on one end,...

In Stock
[Buy Now](https://www.adafruit.com/product/4424)
[Related Guides to the Product](https://learn.adafruit.com/products/4424/guides)
### STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets

[STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets](https://www.adafruit.com/product/4397)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium female headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and...

In Stock
[Buy Now](https://www.adafruit.com/product/4397)
[Related Guides to the Product](https://learn.adafruit.com/products/4397/guides)
### STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long

[STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long](https://www.adafruit.com/product/4210)
This 4-wire cable is a little over 100mm / 4" long and fitted with JST-SH female 4-pin connectors on both ends. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4210)
[Related Guides to the Product](https://learn.adafruit.com/products/4210/guides)

## Related Guides

- [Adafruit 2.2" PiTFT HAT - 320x240 Display](https://learn.adafruit.com/adafruit-2-2-pitft-hat-320-240-primary-display-for-raspberry-pi.md)
- [Adafruit Feather M0 Adalogger](https://learn.adafruit.com/adafruit-feather-m0-adalogger.md)
- [Fair Weather Friend: Internet-Connected Migraine or Allergies Detector](https://learn.adafruit.com/fair-weather-friend-internet-connected-health-and-leisure-forecaster.md)
- [Adafruit BMP388 and BMP390 - Precision Barometric Pressure and Altimeter](https://learn.adafruit.com/adafruit-bmp388-bmp390-bmp3xx.md)
- [Adafruit PowerBoost 500 Shield](https://learn.adafruit.com/adafruit-powerboost-500-shield-rechargeable-battery-pack.md)
- [reef-pi Guide 7: Dosing Controller](https://learn.adafruit.com/reef-pi-guide-5-dosing-controller.md)
- [ItsyBitsy ESP32 wFL case](https://learn.adafruit.com/itsybitsy-esp32-wfl-case.md)
- [Adafruit ESP32-S2 Feather](https://learn.adafruit.com/adafruit-esp32-s2-feather.md)
- [Working with Multiple Same Address I2C Devices](https://learn.adafruit.com/working-with-multiple-i2c-devices.md)
- [Adafruit Proto Under Plate PiCowBell](https://learn.adafruit.com/adafruit-proto-under-plate-picowbell.md)
- [Adafruit MMA8451 Accelerometer Breakout](https://learn.adafruit.com/adafruit-mma8451-accelerometer-breakout.md)
- [Raspberry Pi Video Synth with Blinka and Processing](https://learn.adafruit.com/raspberry-pi-video-synth-with-blinka-and-processing.md)
- [Adafruit Infrared IR Remote Receiver](https://learn.adafruit.com/adafruit-infrared-ir-remote-receiver.md)
- [PyPortal IoT Plant Monitor with Google Cloud IoT Core and CircuitPython](https://learn.adafruit.com/pyportal-iot-plant-monitor-with-google-cloud-iot-core-and-circuitpython.md)
- [Ladyada's Toolkit](https://learn.adafruit.com/ladyadas-toolkit.md)
