Class Mmc5603
Represents the Mmc5603 Three-Axis, Digital Magnetometer
Assembly: MMC5603.dll
View Source
public class Mmc5603 : ByteCommsSensorBase<MagneticField3D>, IObservable<IChangeResult<MagneticField3D>>, IDisposable, IMagnetometer, ISamplingSensor<MagneticField3D>, ISensor<MagneticField3D>, ISensor, ISamplingSensor, II2cPeripheral
Inheritance: System.Object
-> Meadow.Foundation.ObservableBase<UNIT>
Implements:
System.IObservable<Meadow.IChangeResult<Meadow.Units.MagneticField3D>>
, System.IDisposable
, Meadow.Peripherals.Sensors.Motion.IMagnetometer
, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.MagneticField3D>
, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.MagneticField3D>
, Meadow.Peripherals.Sensors.ISensor
, Meadow.Peripherals.Sensors.ISamplingSensor
, Meadow.Hardware.II2cPeripheral
Properties
DefaultI2cAddress
The default I2C address for the peripheral
View Source
public byte DefaultI2cAddress { get; }
MagneticField3D
The current magnetic field value
View Source
public MagneticField3D? MagneticField3D { get; }
ContinuousModeEnabled
Get/set continuous sensor reading mode
View Source
public bool ContinuousModeEnabled { get; set; }
Methods
Reset()
Reset the sensor
View Source
public void Reset()
ReadSensor()
Reads data from the sensor
View Source
protected override Task<MagneticField3D> ReadSensor()
Returns
System.Threading.Tasks.Task<Meadow.Units.MagneticField3D>
: The latest sensor reading### ReadTemperature()
Read the sensor temperature
Doesn't work in continuous mode
View Source
public Task<Temperature> ReadTemperature()
Returns
System.Threading.Tasks.Task<Meadow.Units.Temperature>
Implements
System.IObservable<Meadow.IChangeResult<Meadow.Units.MagneticField3D>>
System.IDisposable
Meadow.Peripherals.Sensors.Motion.IMagnetometer
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.MagneticField3D>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.MagneticField3D>
Meadow.Peripherals.Sensors.ISensor
Meadow.Peripherals.Sensors.ISamplingSensor
Meadow.Hardware.II2cPeripheral