Characteristic Locus
Inheritance System.Object ObservableBase<Acceleration3D> SensorBase<Acceleration3D> SamplingSensorBase<Acceleration3D> ByteCommsSensorBase<Acceleration3D> > Mma7660fc
Implements IDisposable IAccelerometer
Inherited Members ByteCommsSensorBase<Acceleration3D>.Peripheral ByteCommsSensorBase<Acceleration3D>.ReadBuffer ByteCommsSensorBase<Acceleration3D>.WriteBuffer ByteCommsSensorBase<Acceleration3D>.Init(Int32, Int32) ByteCommsSensorBase<Acceleration3D>.Dispose(Boolean) ByteCommsSensorBase<Acceleration3D>.Dispose() SamplingSensorBase<Acceleration3D>.StartUpdating(Nullable<TimeSpan>) SamplingSensorBase<Acceleration3D>.StopUpdating() SensorBase<Acceleration3D>.Updated SensorBase<Acceleration3D>.samplingLock SensorBase<Acceleration3D>.SamplingTokenSource SensorBase<Acceleration3D>.Conditions SensorBase<Acceleration3D>.IsSampling SensorBase<Acceleration3D>.UpdateInterval SensorBase<Acceleration3D>.RaiseEventsAndNotify(IChangeResult<>) SensorBase<Acceleration3D>.Read() ObservableBase<Acceleration3D>.observers ObservableBase<Acceleration3D>.NotifyObservers(IChangeResult<>) Meadow.Foundation.ObservableBase<Acceleration3D>.Subscribe(IObserver<>) Meadow.Foundation.ObservableBase<Acceleration3D>.CreateObserver(Action<>, System.Nullable<Predicate<IChangeResult<UNIT>>>)
Namespace Meadow.Foundation.Sensors.Motion
Assembly Mma7660fc.dll

Syntax

public class Mma7660fc : ByteCommsSensorBase<Acceleration3D>, IDisposable, IAccelerometer

Constructors

Mma7660fc(II2cBus, Mma7660fc.Addresses)

Create a new instance of the Mma7660fc communicating over the I2C interface.

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

Parameters

Type Name Description
II2cBus i2cBus

I2C bus

Mma7660fc.Addresses address

Address of the I2C sensor

Mma7660fc(II2cBus, Byte)

Create a new instance of the Mma7660fc communicating over the I2C interface.

Declaration
public Mma7660fc(II2cBus i2cBus, byte address)

Parameters

Type Name Description
II2cBus i2cBus

I2C bus

System.Byte address

Address of the I2C sensor

Properties

Acceleration3D

Current Acceleration3d value

Declaration
public Acceleration3D? Acceleration3D { get; }

Property Value

Type Description
System.Nullable<Acceleration3D>

Direction

Declaration
public Mma7660fc.DirectionType Direction { get; set; }

Property Value

Type Description
Mma7660fc.DirectionType

Orientation

Declaration
public Mma7660fc.OrientationType Orientation { get; set; }

Property Value

Type Description
Mma7660fc.OrientationType

Methods

RaiseEventsAndNotify(IChangeResult<Acceleration3D>)

Raise event and notify subscribers

Declaration
protected override void RaiseEventsAndNotify(IChangeResult<Acceleration3D> changeResult)

Parameters

Type Name Description
IChangeResult<Acceleration3D> changeResult

Acceleration3d data

ReadSensor()

Read sensor data from registers

Declaration
protected override Task<Acceleration3D> ReadSensor()

Returns

Type Description
Task<Acceleration3D>

Overrides

Meadow.Foundation.SensorBase<Acceleration3D>.ReadSensor()

SetSampleRate(Mma7660fc.SampleRate)

Set sample rate in samples per second

Declaration
public void SetSampleRate(Mma7660fc.SampleRate rate)

Parameters

Type Name Description
Mma7660fc.SampleRate rate

sample rate

Events

Acceleration3DUpdated

Raised when new acceleration data is processed

Declaration
public event EventHandler<IChangeResult<Acceleration3D>> Acceleration3DUpdated

Event Type

Type Description
EventHandler<IChangeResult<Acceleration3D>>