Class Bno055Sensor
BNO055 - inertial measurement unit (IMU).
[Interface("BNO055 - inertial measurement unit (IMU)")]
public class Bno055Sensor
- Inheritance
-
Bno055Sensor
Constructors
Bno055Sensor(I2cDevice, OperationMode, bool)
Initializes a new instance of the Bno055Sensor class.
public Bno055Sensor(I2cDevice i2cDevice, OperationMode operationMode = OperationMode.AccelerometerMagnetometerGyroscopeRelativeOrientation, bool shouldDispose = true)
Parameters
i2cDeviceI2cDeviceThe I2C Device.
operationModeOperationModeThe operation mode to setup.
shouldDisposebooltrue to dispose the I2C device at dispose.
Fields
DefaultI2cAddress
The default I2C Address, page 91 of the main documentation https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BNO055-DS000.pdf.
public const byte DefaultI2cAddress = 40
Field Value
SecondI2cAddress
This is the second I2C Address. It needs to be activated to be valid.
public const byte SecondI2cAddress = 41
Field Value
Properties
Accelerometer
Gets the accelerometer Acceleration Vector (100Hz) Three axis of acceleration (gravity + linear motion) Default unit in m/s^2, can be changed for mg.
[Telemetry]
public Vector3 Accelerometer { get; }
Property Value
- Vector3
Gravity
Gets the gravity Gravity Vector (100Hz) Three axis of gravitational acceleration (minus any movement) Default unit in m/s^2, can be changed for mg.
[Telemetry]
public Vector3 Gravity { get; }
Property Value
- Vector3
Gyroscope
Gets the gyroscope.
[Telemetry]
public Vector3 Gyroscope { get; }
Property Value
- Vector3
Info
Gets the information about various sensor system versions and ID.
public Info Info { get; }
Property Value
LinearAcceleration
Gets the linear acceleration Linear Acceleration Vector (100Hz) Three axis of linear acceleration data (acceleration minus gravity) Default unit in m/s^2, can be changed for mg.
[Telemetry]
public Vector3 LinearAcceleration { get; }
Property Value
- Vector3
Magnetometer
Get the Magnetometer.
[Telemetry]
public Vector3 Magnetometer { get; }
Property Value
- Vector3
OperationMode
Gets or sets the operation mode.
[Property]
public OperationMode OperationMode { get; set; }
Property Value
Orientation
Gets the orientation (Euler Angles) X = Heading, Y = Roll, Z = Pitch.
[Telemetry(null, "Orientation (Euler Angles)")]
public Vector3 Orientation { get; }
Property Value
- Vector3
PowerMode
Gets or sets the power mode.
[Property]
public PowerMode PowerMode { get; set; }
Property Value
Quaternion
Gets the quaternion, unit is 1 Quaternion (unit less) = 2^14 returned result.
[Telemetry]
public Vector4 Quaternion { get; }
Property Value
- Vector4
Temperature
Gets the temperature.
[Telemetry]
public Temperature Temperature { get; }
Property Value
TemperatureSource
Gets or sets the temperature source.
[Property]
public TemperatureSource TemperatureSource { get; set; }
Property Value
Units
Gets or sets the units used. By default, international system is used.
[Property]
public Units Units { get; set; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetAccelerometerCalibrationData()
Get the accelerometer calibration data.
[Command]
public Vector4 GetAccelerometerCalibrationData()
Returns
- Vector4
Returns the accelerometers calibration data.
GetAxisMap()
Get the Axis map.
public AxisSetting[] GetAxisMap()
Returns
- AxisSetting[]
Returns an array where first element is axis X, then Y then Z.
GetCalibrationStatus()
Returns the calibration status for the system and sensors.
[Command]
public CalibrationStatus GetCalibrationStatus()
Returns
- CalibrationStatus
Calibration status.
GetError()
Get the latest error.
[Telemetry("Status")]
public Error GetError()
Returns
- Error
Returns the latest error.
GetGyroscopeCalibrationData()
Get the gyroscope calibration data.
[Command]
public Vector3 GetGyroscopeCalibrationData()
Returns
- Vector3
X, Y and Z data.
GetInteruptStatus()
Gets the interupt status.
public InteruptStatus GetInteruptStatus()
Returns
- InteruptStatus
InteruptStatus of the sensor.
GetMagnetometerCalibrationData()
Get the magnetometer calibration data.
[Command]
public Vector4 GetMagnetometerCalibrationData()
Returns
- Vector4
Returns the magnetometer calibration data.
GetStatus()
Get the status. If there is an error, GetError() will give more details.
[Telemetry("Status")]
public Status GetStatus()
Returns
- Status
Status of the sensor.
RunSelfTest()
Run a self test. In case of error, use GetStatus() and GetError() to get the last error.
[Command]
public TestResult RunSelfTest()
Returns
- TestResult
Status fo the test.
SetAccelerometerCalibrationData(Vector4)
Set the accelerometer calibration data.
[Command]
public void SetAccelerometerCalibrationData(Vector4 calibrationData)
Parameters
calibrationDataVector4Calibration data.
SetAxisMap(AxisSetting, AxisSetting, AxisSetting)
Set the Axis map.
public void SetAxisMap(AxisSetting x, AxisSetting y, AxisSetting z)
Parameters
xAxisSettingX axis setting.
yAxisSettingY axis setting.
zAxisSettingZ axis setting.
SetExternalCrystal(bool)
Set internal or external crystal usage. Note: if you don't have an external crystal, don't use this function.
public void SetExternalCrystal(bool external)
Parameters
SetGyroscopeCalibrationData(Vector3)
Set the gyroscope calibration data.
[Command]
public void SetGyroscopeCalibrationData(Vector3 calibrationData)
Parameters
calibrationDataVector3X, Y and Z data.
SetMagnetometerCalibrationData(Vector4)
Set the magnetometer calibration data.
[Command]
public void SetMagnetometerCalibrationData(Vector4 calibrationData)
Parameters
calibrationDataVector4Calibration data.