Remarks

Bno055
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Bno055

BNO055 is a 9-axis absolute orientation sensor. The three sensors (accelerometer, gyroscope and magnetometer) are measured with a 32-bit cortex M0 microcontroller. The BNO055 is controlled via I2C.

Purchasing

Code Example

Bno055 sensor;

public MeadowApp()
{
    Console.WriteLine("Initializing");

    // create the sensor driver
    sensor = new Bno055(Device.CreateI2cBus());

    // classical .NET events can also be used:
    sensor.Updated += (sender, result) =>
    {
        Console.WriteLine($"Accel: [X:{result.New.Acceleration3D?.X.MetersPerSecondSquared:N2}," +
            $"Y:{result.New.Acceleration3D?.Y.MetersPerSecondSquared:N2}," +
            $"Z:{result.New.Acceleration3D?.Z.MetersPerSecondSquared:N2} (m/s^2)]");

        Console.WriteLine($"Gyro: [X:{result.New.AngularVelocity3D?.X.DegreesPerSecond:N2}," +
            $"Y:{result.New.AngularVelocity3D?.Y.DegreesPerSecond:N2}," +
            $"Z:{result.New.AngularVelocity3D?.Z.DegreesPerSecond:N2} (degrees/s)]");

        Console.WriteLine($"Compass: [X:{result.New.MagneticField3D?.X.Tesla:N2}," +
            $"Y:{result.New.MagneticField3D?.Y.Tesla:N2}," +
            $"Z:{result.New.MagneticField3D?.Z.Tesla:N2} (Tesla)]");

        Console.WriteLine($"Gravity: [X:{result.New.GravityVector?.X.MetersPerSecondSquared:N2}," +
            $"Y:{result.New.GravityVector?.Y.MetersPerSecondSquared:N2}," +
            $"Z:{result.New.GravityVector?.Z.MetersPerSecondSquared:N2} (meters/s^2)]");

        // TODO: what is the unit here. quaternion need to be unitized.
        Console.WriteLine($"Quaternion orientation: [X:{result.New.QuaternionOrientation?.X:N2}," +
            $"Y:{result.New.QuaternionOrientation?.Y:N2}," +
            $"Z:{result.New.QuaternionOrientation?.Z:N2}]");

        // TODO: what is the unit here. euler angles need to be unitized.
        Console.WriteLine($"Euler orientation: [heading: {result.New.EulerOrientation?.Heading:N2}," +
            $"Roll: {result.New.EulerOrientation?.Roll:N2}," +
            $"Pitch: {result.New.EulerOrientation?.Pitch:N2}]");

        Console.WriteLine($"Linear Accel: [X:{result.New.LinearAcceleration?.X.MetersPerSecondSquared:N2}," +
            $"Y:{result.New.LinearAcceleration?.Y.MetersPerSecondSquared:N2}," +
            $"Z:{result.New.LinearAcceleration?.Z.MetersPerSecondSquared:N2} (meters/s^2)]");

        Console.WriteLine($"Temp: {result.New.Temperature?.Celsius:N2}C");
    };

    // Example that uses an IObservable subscription to only be notified when the filter is satisfied
    var consumer = Bno055.CreateObserver(
        handler: result => Console.WriteLine($"Observer: [x] changed by threshold; new [x]: X:{result.New.Acceleration3D?.X.MetersPerSecondSquared:N2}, old: X:{result.Old?.Acceleration3D?.X.MetersPerSecondSquared:N2}"),
        // only notify if there's a greater than 1 micro tesla on the Y axis

        filter: result =>
        {
            if (result.Old is { } old)
            { //c# 8 pattern match syntax. checks for !null and assigns var.
                return ((result.New.Acceleration3D - old.Acceleration3D)?.Y > new Acceleration(1, AU.MetersPerSecondSquared));
            }
            return false;
        });
    sensor.Subscribe(consumer);

    //==== one-off read
    ReadConditions().Wait();

    // start updating
    sensor.StartUpdating(TimeSpan.FromMilliseconds(500));
}

protected async Task ReadConditions()
{
    var result = await sensor.Read();
    Console.WriteLine("Initial Readings:");
    Console.WriteLine($"Accel: [X:{result.Acceleration3D?.X.MetersPerSecondSquared:N2}," +
        $"Y:{result.Acceleration3D?.Y.MetersPerSecondSquared:N2}," +
        $"Z:{result.Acceleration3D?.Z.MetersPerSecondSquared:N2} (m/s^2)]");

    Console.WriteLine($"Gyro: [X:{result.AngularVelocity3D?.X.DegreesPerSecond:N2}," +
        $"Y:{result.AngularVelocity3D?.Y.DegreesPerSecond:N2}," +
        $"Z:{result.AngularVelocity3D?.Z.DegreesPerSecond:N2} (degrees/s)]");

    Console.WriteLine($"Compass: [X:{result.MagneticField3D?.X.Tesla:N2}," +
        $"Y:{result.MagneticField3D?.Y.Tesla:N2}," +
        $"Z:{result.MagneticField3D?.Z.Tesla:N2} (Tesla)]");

    Console.WriteLine($"Gravity: [X:{result.GravityVector?.X.MetersPerSecondSquared:N2}," +
        $"Y:{result.GravityVector?.Y.MetersPerSecondSquared:N2}," +
        $"Z:{result.GravityVector?.Z.MetersPerSecondSquared:N2} (meters/s^2)]");

    // TODO: what is the unit here. quaternion need to be unitized.
    Console.WriteLine($"Quaternion orientation: [X:{result.QuaternionOrientation?.X:N2}," +
        $"Y:{result.QuaternionOrientation?.Y:N2}," +
        $"Z:{result.QuaternionOrientation?.Z:N2}]");

    // TODO: what is the unit here. euler angles need to be unitized.
    Console.WriteLine($"Euler orientation: [heading: {result.EulerOrientation?.Heading:N2}," +
        $"Roll: {result.EulerOrientation?.Roll:N2}," +
        $"Pitch: {result.EulerOrientation?.Pitch:N2}]");

    Console.WriteLine($"Linear Accel: [X:{result.LinearAcceleration?.X.MetersPerSecondSquared:N2}," +
        $"Y:{result.LinearAcceleration?.Y.MetersPerSecondSquared:N2}," +
        $"Z:{result.LinearAcceleration?.Z.MetersPerSecondSquared:N2} (meters/s^2)]");

    Console.WriteLine($"Temp: {result.Temperature?.Celsius:N2}C");
}

Sample project(s) available on GitHub

Wiring Example

The following diagram shows the BNO055 configured for bas

Characteristic Locus
Inheritance System.Object ObservableBase<System.ValueTuple<System.Nullable<Acceleration3D>, System.Nullable<AngularVelocity3D>, System.Nullable<MagneticField3D>, System.Nullable<Quaternion>, System.Nullable<Acceleration3D>, System.Nullable<Acceleration3D>, System.Nullable<EulerAngles>, System.ValueTuple<System.Nullable<Units.Temperature>>>> SensorBase<System.ValueTuple<System.Nullable<Acceleration3D>, System.Nullable<AngularVelocity3D>, System.Nullable<MagneticField3D>, System.Nullable<Quaternion>, System.Nullable<Acceleration3D>, System.Nullable<Acceleration3D>, System.Nullable<EulerAngles>, System.ValueTuple<System.Nullable<Units.Temperature>>>> SamplingSensorBase<System.ValueTuple<System.Nullable<Acceleration3D>, System.Nullable<AngularVelocity3D>, System.Nullable<MagneticField3D>, System.Nullable<Quaternion>, System.Nullable<Acceleration3D>, System.Nullable<Acceleration3D>, System.Nullable<EulerAngles>, System.ValueTuple<System.Nullable<Units.Temperature>>>> ByteCommsSensorBase<System.ValueTuple<System.Nullable<Acceleration3D>, System.Nullable<AngularVelocity3D>, System.Nullable<MagneticField3D>, System.Nullable<Quaternion>, System.Nullable<Acceleration3D>, System.Nullable<Acceleration3D>, System.Nullable<EulerAngles>, System.ValueTuple<System.Nullable<Units.Temperature>>>> > Bno055
Implements IDisposable IAccelerometer IGyroscope ITemperatureSensor
Inherited Members ByteCommsSensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.Peripheral ByteCommsSensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.ReadBuffer ByteCommsSensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.WriteBuffer ByteCommsSensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.Init(Int32, Int32) ByteCommsSensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.Dispose(Boolean) ByteCommsSensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.Dispose() SamplingSensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.StartUpdating(Nullable<TimeSpan>) SamplingSensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.StopUpdating() SensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.Updated SensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.samplingLock SensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.SamplingTokenSource SensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.Conditions SensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.IsSampling SensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.UpdateInterval SensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.ReadSensor() SensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.RaiseEventsAndNotify(IChangeResult<ValueTuple<Nullable<Acceleration3D>, Nullable<AngularVelocity3D>, Nullable<MagneticField3D>, Nullable<Quaternion>, Nullable<Acceleration3D>, Nullable<Acceleration3D>, Nullable<EulerAngles>, ValueTuple<Nullable<Units.Temperature>>>>) SensorBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.Read() ObservableBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.observers ObservableBase<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>.NotifyObservers(IChangeResult<ValueTuple<Nullable<Acceleration3D>, Nullable<AngularVelocity3D>, Nullable<MagneticField3D>, Nullable<Quaternion>, Nullable<Acceleration3D>, Nullable<Acceleration3D>, Nullable<EulerAngles>, ValueTuple<Nullable<Units.Temperature>>>>) Meadow.Foundation.ObservableBase<System.ValueTuple<System.Nullable<Acceleration3D>, System.Nullable<AngularVelocity3D>, System.Nullable<MagneticField3D>, System.Nullable<Meadow.Foundation.Spatial.Quaternion>, System.Nullable<Acceleration3D>, System.Nullable<Acceleration3D>, System.Nullable<Meadow.Foundation.Spatial.EulerAngles>, System.ValueTuple<System.Nullable<Units.Temperature>>>>.Subscribe(IObserver<>) Meadow.Foundation.ObservableBase<System.ValueTuple<System.Nullable<Acceleration3D>, System.Nullable<AngularVelocity3D>, System.Nullable<MagneticField3D>, System.Nullable<Meadow.Foundation.Spatial.Quaternion>, System.Nullable<Acceleration3D>, System.Nullable<Acceleration3D>, System.Nullable<Meadow.Foundation.Spatial.EulerAngles>, System.ValueTuple<System.Nullable<Units.Temperature>>>>.CreateObserver(Action<>, System.Nullable<Predicate<Meadow.IChangeResult<UNIT>>>)
Namespace Meadow.Foundation.Sensors.Motion
Assembly Bno055.dll

Syntax

public class Bno055 : ByteCommsSensorBase<(Acceleration3D? Acceleration3D, AngularVelocity3D? AngularVelocity3D, MagneticField3D? MagneticField3D, Quaternion? QuaternionOrientation, Acceleration3D? LinearAcceleration, Acceleration3D? GravityVector, EulerAngles? EulerOrientation, Units.Temperature? Temperature)>, IDisposable, IAccelerometer, IGyroscope, ITemperatureSensor

Constructors

Bno055(II2cBus, Bno055.Addresses)

Create a new BNO055 object using the default parameters for the component.

Declaration
public Bno055(II2cBus i2cBus, Bno055.Addresses address = default(Bno055.Addresses))

Parameters

Type Name Description
II2cBus i2cBus

I2C bus (default = 400 KHz).

Bno055.Addresses address

Address of the BNO055 (default = 0x28).

Bno055(II2cBus, Byte)

Create a new BNO055 object using the default parameters for the component.

Declaration
public Bno055(II2cBus i2cBus, byte address)

Parameters

Type Name Description
II2cBus i2cBus

I2C bus (default = 400 KHz).

System.Byte address

Address of the BNO055 (default = 0x28).

Properties

Acceleration3D

Declaration
public Acceleration3D? Acceleration3D { get; }

Property Value

Type Description
System.Nullable<Acceleration3D>

AngularVelocity3D

Declaration
public AngularVelocity3D? AngularVelocity3D { get; }

Property Value

Type Description
System.Nullable<AngularVelocity3D>

EulerOrientation

Declaration
public EulerAngles? EulerOrientation { get; }

Property Value

Type Description
System.Nullable<EulerAngles>

GravityVector

Declaration
public Acceleration3D? GravityVector { get; }

Property Value

Type Description
System.Nullable<Acceleration3D>

IsAccelerometerCalibrated

Get the accelerometer calibration status.

Declaration
public bool IsAccelerometerCalibrated { get; }

Property Value

Type Description
System.Boolean

IsFullyCalibrated

Is the system fully calibrated?

Declaration
public bool IsFullyCalibrated { get; }

Property Value

Type Description
System.Boolean

Remarks

The sensor is fully calibrated if the system, accelerometer, gyroscope and megnetometer are all calibrated.

IsGyroscopeCalibrated

Get the gyroscope calibration status.

Declaration
public bool IsGyroscopeCalibrated { get; }

Property Value

Type Description
System.Boolean

IsInFusionMode

Check if sensor is currently working in Fusion mode.

Declaration
public bool IsInFusionMode { get; }

Property Value

Type Description
System.Boolean

IsMagnetometerCalibrated

Get the magnetometer status.

Declaration
public bool IsMagnetometerCalibrated { get; }

Property Value

Type Description
System.Boolean

IsSystemCalibrated

Get the system calibration status.

Declaration
public bool IsSystemCalibrated { get; }

Property Value

Type Description
System.Boolean

LinearAcceleration

Declaration
public Acceleration3D? LinearAcceleration { get; }

Property Value

Type Description
System.Nullable<Acceleration3D>

MagneticField3D

Declaration
public MagneticField3D? MagneticField3D { get; }

Property Value

Type Description
System.Nullable<MagneticField3D>

OperatingMode

Get / set the current operating mode for the sensor.

Declaration
public byte OperatingMode { get; set; }

Property Value

Type Description
System.Byte

Remarks

Mode change takes 7-19 ms.

PowerMode

Get or set the power mode for the sensor.

Declaration
public byte PowerMode { get; set; }

Property Value

Type Description
System.Byte

QuaternionOrientation

Declaration
public Quaternion? QuaternionOrientation { get; }

Property Value

Type Description
System.Nullable<Quaternion>

Temperature

Declaration
public Units.Temperature? Temperature { get; }

Property Value

Type Description
System.Nullable<Units.Temperature>

TemperatureSource

Select the source of the Temperatute property.

Declaration
public Bno055.Sensor TemperatureSource { get; set; }

Property Value

Type Description
Bno055.Sensor

Methods

ConvertReadingToEulerAngles(Int32, Double)

Convert the sensor readings into an orientation in Euler angles.

Declaration
protected EulerAngles ConvertReadingToEulerAngles(int start, double divisor)

Parameters

Type Name Description
System.Int32 start

First of the sensor readings to convert.

System.Double divisor

Divisor to apply to the sensor data.

Returns

Type Description
EulerAngles

EulerAngles object containing the orientation informaiton.

DisplayRegisters()

Read all of the registers and display their values on the Debug output.

Declaration
public void DisplayRegisters()

GetReadings(Int32, Double)

Convert a section of the sensor data into a tuple.

Declaration
protected (double X, double Y, double Z) GetReadings(int start, double divisor)

Parameters

Type Name Description
System.Int32 start

Start of the data in the _sensorReadings member variable.

System.Double divisor

Returns

Type Description
System.ValueTuple<System.Double, System.Double, System.Double>

RaiseEventsAndNotify(IChangeResult<(Nullable<Acceleration3D> Acceleration3D, Nullable<AngularVelocity3D> AngularVelocity3D, Nullable<MagneticField3D> MagneticField3D, Nullable<Quaternion> QuaternionOrientation, Nullable<Acceleration3D> LinearAcceleration, Nullable<Acceleration3D> GravityVector, Nullable<EulerAngles> EulerOrientation, Nullable<Units.Temperature> Temperature)>)

Declaration
protected override void RaiseEventsAndNotify(IChangeResult<(Acceleration3D? Acceleration3D, AngularVelocity3D? AngularVelocity3D, MagneticField3D? MagneticField3D, Quaternion? QuaternionOrientation, Acceleration3D? LinearAcceleration, Acceleration3D? GravityVector, EulerAngles? EulerOrientation, Units.Temperature? Temperature)> changeResult)

Parameters

Type Name Description
IChangeResult<System.ValueTuple<System.Nullable<Acceleration3D>, System.Nullable<AngularVelocity3D>, System.Nullable<MagneticField3D>, System.Nullable<Quaternion>, System.Nullable<Acceleration3D>, System.Nullable<Acceleration3D>, System.Nullable<EulerAngles>, System.ValueTuple<System.Nullable<Units.Temperature>>>> changeResult

ReadSensor()

Declaration
protected override Task<(Acceleration3D? Acceleration3D, AngularVelocity3D? AngularVelocity3D, MagneticField3D? MagneticField3D, Quaternion? QuaternionOrientation, Acceleration3D? LinearAcceleration, Acceleration3D? GravityVector, EulerAngles? EulerOrientation, Units.Temperature? Temperature)> ReadSensor()

Returns

Type Description
Task<System.ValueTuple<System.Nullable<Acceleration3D>, System.Nullable<AngularVelocity3D>, System.Nullable<MagneticField3D>, System.Nullable<Quaternion>, System.Nullable<Acceleration3D>, System.Nullable<Acceleration3D>, System.Nullable<EulerAngles>, System.ValueTuple<System.Nullable<Units.Temperature>>>>

Overrides

Meadow.Foundation.SensorBase<System.ValueTuple<System.Nullable<Acceleration3D>, System.Nullable<AngularVelocity3D>, System.Nullable<MagneticField3D>, System.Nullable<Meadow.Foundation.Spatial.Quaternion>, System.Nullable<Acceleration3D>, System.Nullable<Acceleration3D>, System.Nullable<Meadow.Foundation.Spatial.EulerAngles>, System.ValueTuple<System.Nullable<Units.Temperature>>>>.ReadSensor()

StartUpdating(Nullable<TimeSpan>)

Declaration
public override void StartUpdating(TimeSpan? updateInterval = null)

Parameters

Type Name Description
System.Nullable<TimeSpan> updateInterval

StopUpdating()

Declaration
public override void StopUpdating()

Overrides

Meadow.Foundation.SamplingSensorBase<System.ValueTuple<System.Nullable<Acceleration3D>, System.Nullable<AngularVelocity3D>, System.Nullable<MagneticField3D>, System.Nullable<Meadow.Foundation.Spatial.Quaternion>, System.Nullable<Acceleration3D>, System.Nullable<Acceleration3D>, System.Nullable<Meadow.Foundation.Spatial.EulerAngles>, System.ValueTuple<System.Nullable<Units.Temperature>>>>.StopUpdating()

Events

Acceleration3DUpdated

Declaration
public event EventHandler<IChangeResult<Acceleration3D>> Acceleration3DUpdated

Event Type

Type Description
EventHandler<IChangeResult<Acceleration3D>>

AngularVelocity3DUpdated

Declaration
public event EventHandler<IChangeResult<AngularVelocity3D>> AngularVelocity3DUpdated

Event Type

Type Description
EventHandler<IChangeResult<AngularVelocity3D>>

EulerOrientationUpdated

Declaration
public event EventHandler<IChangeResult<EulerAngles>> EulerOrientationUpdated

Event Type

Type Description
EventHandler<IChangeResult<EulerAngles>>

GravityVectorUpdated

Declaration
public event EventHandler<IChangeResult<Acceleration3D>> GravityVectorUpdated

Event Type

Type Description
EventHandler<IChangeResult<Acceleration3D>>

LinearAccelerationUpdated

Declaration
public event EventHandler<IChangeResult<Acceleration3D>> LinearAccelerationUpdated

Event Type

Type Description
EventHandler<IChangeResult<Acceleration3D>>

MagneticField3DUpdated

Declaration
public event EventHandler<IChangeResult<MagneticField3D>> MagneticField3DUpdated

Event Type

Type Description
EventHandler<IChangeResult<MagneticField3D>>

QuaternionOrientationUpdated

Declaration
public event EventHandler<IChangeResult<Quaternion>> QuaternionOrientationUpdated

Event Type

Type Description
EventHandler<IChangeResult<Quaternion>>

TemperatureUpdated

Declaration
public event EventHandler<IChangeResult<Units.Temperature>> TemperatureUpdated

Event Type

Type Description
EventHandler<IChangeResult<Units.Temperature>>