Skip to content
Arduino library for the BNO055 breakout board from Bosch. Enables easy use as a compass for robotics (RoboCup Junior).
C++
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Aug 28, 2018
examples
src set the acc_range to 16G, Mar 11, 2019
LICENSE added GNU GENERAL PUBLIC LICENSE v2.0 to the repository Aug 28, 2018
README.md add the new functions to readme Feb 18, 2019
keywords.txt Added a function which returns a uint8_t with every calibration value… Feb 6, 2019
library.properties set the acc_range to 16G, Mar 11, 2019

README.md

BohleBots_BNO055

Description

This library is intended for the BNO055 9-axis absolute orientation sensor. With this library you can use your BNO055 as a fast and simple compass. It provides functions for reading the heading of the compass and circumventing the automatic recalibration of the sensor on impacts. It was designed to be simple and faster than the Adafruit library for the BNO055.

Functions

startBNO(impact, forward) enables high-G interrupts (impact detection) and puts the BNO055 into NDOF fusion mode. Impact accepts an integer from 0-255 and regulates the threshold for the impact detection (higher means more G). forward accepts a bool and forwards interrupts to the INT pin if true. Required to use the compass (call in setup())

getHeadingAuto(address) outputs the current heading as an 16-bit signed integer and automatically reloads the calibration offsets stored at the specified EEPROM address if an impact occurred.

getRLHeadingAuto(address) outputs the current heading relative to the set reference point (from 180 to -180) as an 16-bit signed integer and automatically reloads the calibration offsets stored at the specified EEPROM address if an impact occurred.

getHeading() outputs the current heading as an 16-bit signed integer.

getRoll() outputs the current roll as an 16-bit signed integer.

getPitch() outputs the current pitch as an 16-bit signed integer.

getImpact() returns true if an high-G interrupt (impact) occurred.

isCalibrated() returns true if every sensors on the BNO055 has reached complete calibration.

getCalibration() returns all for calibration values in one byte, each taking two bytes.

serialPrintCalibStat() prints the current calibration levels via serial. Established serial connection required.

saveOffsets(address) gets current calibration offset values from the BNO055 and saves them to the specified EEPROM address. Offset data consists of 22 bytes.

loadOffsets(address) gets calibration offset values saved at the specified EEPROM address and writes them onto the BNO055.

setReference() saves the current orientation as a reference point for the relative heading.

getRLHeading() outputs the current heading relative to the reference point (from 180 to -180) as an 16-bit signed integer.

Average execution times

getHeading(): 290µs Adafruit Library: 1130µs

You can’t perform that action at this time.