Skip to main content

Class Adxl3xxBase

Base class for ADXL335, ADXL337, and ADXL377 triple axis accelerometers

Assembly: Adxl3xx.dll
View Source
Declaration
public abstract class Adxl3xxBase : PollingSensorBase<Acceleration3D>, IObservable<IChangeResult<Acceleration3D>>, IAccelerometer, ISamplingSensor<Acceleration3D>, ISensor<Acceleration3D>, ISensor, ISamplingSensor, IDisposable

Inheritance: System.Object -> Meadow.Foundation.ObservableBase<UNIT>

Derived:
Meadow.Foundation.Sensors.Motion.Adxl335

Implements:
System.IObservable<Meadow.IChangeResult<Meadow.Units.Acceleration3D>>, 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, System.IDisposable

Properties

XAnalogInputPort

The X analog input port

View Source
Declaration
protected IAnalogInputPort XAnalogInputPort { get; }

YAnalogInputPort

The Y analog input port

View Source
Declaration
protected IAnalogInputPort YAnalogInputPort { get; }

ZAnalogInputPort

The Z analog input port

View Source
Declaration
protected IAnalogInputPort ZAnalogInputPort { get; }

SupplyVoltage

Power supply voltage applied to the sensor - this will be set (in the constructor) to 3.3V by default

View Source
Declaration
protected Voltage SupplyVoltage { get; }

GravityRange

Gravity range

View Source
Declaration
protected double GravityRange { get; }

Acceleration3D

The current acceleration value

View Source
Declaration
public Acceleration3D? Acceleration3D { get; }

IsDisposed

Is the object disposed

View Source
Declaration
public bool IsDisposed { get; }

Methods

ReadSensor()

Reads data from the sensor

View Source
Declaration
protected override Task<Acceleration3D> ReadSensor()
Returns

System.Threading.Tasks.Task<Meadow.Units.Acceleration3D>: The latest sensor reading### VoltageToGravity(Voltage) Convert voltage to gravity

View Source
Declaration
protected Acceleration VoltageToGravity(Voltage voltage)
Returns

Meadow.Units.Acceleration: Acceleration value

Parameters
TypeNameDescription
Meadow.Units.VoltagevoltageThe voltage to convert

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source
Declaration
public void Dispose()

Dispose(bool)

Dispose of the object

View Source
Declaration
protected virtual void Dispose(bool disposing)
Parameters
TypeNameDescription
System.BooleandisposingIs disposing

Implements

  • System.IObservable<Meadow.IChangeResult<Meadow.Units.Acceleration3D>>
  • 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
  • System.IDisposable