Class Mma7660fc
Represents Mma7660fc 3-axis accelerometer
Assembly: Mma7660fc.dll
View Source
public class Mma7660fc : ByteCommsSensorBase<Acceleration3D>, IObservable<IChangeResult<Acceleration3D>>, IDisposable, IAccelerometer, ISamplingSensor<Acceleration3D>, ISensor<Acceleration3D>, ISensor, ISamplingSensor, II2cPeripheral
Inheritance: System.Object
-> Meadow.Foundation.ObservableBase<UNIT>
Implements:
System.IObservable<Meadow.IChangeResult<Meadow.Units.Acceleration3D>>
, System.IDisposable
, Meadow.Peripherals.Sensors.Motion.IAccelerometer
, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Acceleration3D>
, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Acceleration3D>
, 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; }
Acceleration3D
Current Acceleration3d value
View Source
public Acceleration3D? Acceleration3D { get; }
Direction
Get the current direction value
View Source
public Mma7660fc.DirectionType Direction { get; set; }
Orientation
Get the current orientation
View Source
public Mma7660fc.OrientationType Orientation { get; set; }
Methods
SetSampleRate(SampleRate)
Set sample rate in samples per second
View Source
public void SetSampleRate(Mma7660fc.SampleRate rate)
Parameters
Type | Name | Description |
---|---|---|
Meadow.Foundation.Sensors.Motion.Mma7660fc.SampleRate | rate | sample rate |
ReadSensor()
Read sensor data from registers
View Source
protected override Task<Acceleration3D> ReadSensor()
Returns
System.Threading.Tasks.Task<Meadow.Units.Acceleration3D>
Implements
System.IObservable<Meadow.IChangeResult<Meadow.Units.Acceleration3D>>
System.IDisposable
Meadow.Peripherals.Sensors.Motion.IAccelerometer
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Acceleration3D>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Acceleration3D>
Meadow.Peripherals.Sensors.ISensor
Meadow.Peripherals.Sensors.ISamplingSensor
Meadow.Hardware.II2cPeripheral