Bosch Sensortec BNO055 embedded-hal driver
What is this?
This is a embedded-hal driver for Bosch's inertial measurement unit (IMU) BNO055.
It is device-agnostic and uses I2c and Delay embedded-hal traits for its operation.
Uses and re-exports nalgebra's Quaternion for quaternion reading and Rotation3 for Euler angles.
Usage
-
Add dependency to
Cargo.toml: -
Instantiate and init the device:
// ... declare and configure your I2c and Delay implementations ... // Init BNO055 IMU let imu = new; imu.init?; // Enable 9-degrees-of-freedom sensor fusion mode with fast magnetometer calibration imu.set_mode?; Ok -
Read orientation data: quaternion or euler angles (roll, pitch, yaw/heading)
let quat = imu.quaternion?; // or: let euler = imu.euler_angles?;