Bosch BNO055 IMU Driver

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
User avatar
Posts: 1341
Joined: Thu May 28, 2015 5:54 pm

Bosch BNO055 IMU Driver

Post by deshipu » Wed Feb 08, 2017 11:09 pm

I have created a basic driver for the BNO055 IMU sensor. The code is available at

Posts: 2
Joined: Mon Jan 07, 2019 6:03 am

BNO055 data viewing with repl via i2c or uart

Post by Daks96 » Mon Jan 07, 2019 6:22 am

Hi. I've been using bno055 with arduino perfectly to get the roll, pitch, yaw values but I need to use micropython board now with bno055. I'm new to I2C programming with micropy. Could u tell me how to fetch data from the BNO055 board via uart or i2c? Has a code for calibration of BNO055 been imported to micropy? Is it possible for me to view the roll, pitch, yaw data from repl prompt on my terminal?

User avatar
Posts: 159
Joined: Mon Jan 23, 2017 6:39 am

Re: Bosch BNO055 IMU Driver

Post by mattyt » Mon Jan 07, 2019 10:47 am

Heya Daks,

Most of your questions can be answered if you take a look at Deshipu's code. It's only around 100 lines and very readable (I especially like the use of the partial functions Deshipu!).

The example in the docstring should be particularly useful to you:

Code: Select all

import bno055
from machine import I2C, Pin

i2c = I2C(-1, Pin(5), Pin(4), timeout=1000)
s = bno055.BNO055(i2c)
It doesn't appear that calibration is performed and I presume roll, pitch and yaw need to be calculated from the primitives that the device provides. Happy to be corrected though; I'm not familiar with that sensor.

Just copy the two files in the repository to your MicroPython device and then you can retrieve the sensor values at the REPL.

Post Reply