pub struct Bno055 { /* private fields */ }Implementations§
Source§impl Bno055
impl Bno055
Sourcepub fn new(i2c_bus: &str) -> Result<Self, Error>
pub fn new(i2c_bus: &str) -> Result<Self, Error>
Creates a new BNO055 device instance using the specified I2C bus.
§Arguments
i2c_bus- The I2C bus path (e.g., “/dev/i2c-1”)
pub fn reset(&mut self) -> Result<(), Error>
Sourcepub fn get_quaternion(&mut self) -> Result<Quaternion, Error>
pub fn get_quaternion(&mut self) -> Result<Quaternion, Error>
Returns the current orientation as a quaternion. The quaternion values are normalized and unitless.
Sourcepub fn get_euler_angles(&mut self) -> Result<EulerAngles, Error>
pub fn get_euler_angles(&mut self) -> Result<EulerAngles, Error>
Returns the current orientation in Euler angles. All angles (roll, pitch, yaw) are in degrees.
Sourcepub fn get_linear_acceleration(&mut self) -> Result<Vector3, Error>
pub fn get_linear_acceleration(&mut self) -> Result<Vector3, Error>
Returns the linear acceleration vector with gravity compensation. All components (x, y, z) are in meters per second squared (m/s²).
Sourcepub fn get_gravity_vector(&mut self) -> Result<Vector3, Error>
pub fn get_gravity_vector(&mut self) -> Result<Vector3, Error>
Returns the gravity vector with linear acceleration compensation. All components (x, y, z) are in meters per second squared (m/s²).
Sourcepub fn get_accelerometer(&mut self) -> Result<Vector3, Error>
pub fn get_accelerometer(&mut self) -> Result<Vector3, Error>
Returns the raw accelerometer readings including gravity. All components (x, y, z) are in meters per second squared (m/s²).
Sourcepub fn get_magnetometer(&mut self) -> Result<Vector3, Error>
pub fn get_magnetometer(&mut self) -> Result<Vector3, Error>
Returns the magnetometer readings. All components (x, y, z) are in microTesla (µT).
Sourcepub fn get_gyroscope(&mut self) -> Result<Vector3, Error>
pub fn get_gyroscope(&mut self) -> Result<Vector3, Error>
Returns the gyroscope readings. All components (x, y, z) are in degrees per second (°/s).
Sourcepub fn get_temperature(&mut self) -> Result<i8, Error>
pub fn get_temperature(&mut self) -> Result<i8, Error>
Returns the chip temperature. Temperature is in degrees Celsius (°C).
Sourcepub fn get_calibration_status(&mut self) -> Result<u8, Error>
pub fn get_calibration_status(&mut self) -> Result<u8, Error>
Returns the calibration status byte. Bits 5-4: gyroscope (0-3) Bits 3-2: accelerometer (0-3) Bits 1-0: magnetometer (0-3) For each sensor, 0 = uncalibrated, 3 = fully calibrated