Page 1 of 1

Bosch BNO055 IMU Driver

Posted: Wed Feb 08, 2017 11:09 pm
by deshipu
I have created a basic driver for the BNO055 IMU sensor. The code is available at

BNO055 data viewing with repl via i2c or uart

Posted: Mon Jan 07, 2019 6:22 am
by Daks96
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?

Re: Bosch BNO055 IMU Driver

Posted: Mon Jan 07, 2019 10:47 am
by mattyt
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.