Remarks

Ads1x15
Status Status badge: working
Source code GitHub
Characteristic Locus
Inheritance System.Object ObservableBase<Units.Voltage> SensorBase<Units.Voltage> SamplingSensorBase<Units.Voltage> > Ads1x15 > Ads1015 > Ads1115
Inherited Members SamplingSensorBase<Units.Voltage>.StartUpdating(Nullable<TimeSpan>) SamplingSensorBase<Units.Voltage>.StopUpdating() SensorBase<Units.Voltage>.Updated SensorBase<Units.Voltage>.samplingLock SensorBase<Units.Voltage>.SamplingTokenSource SensorBase<Units.Voltage>.Conditions SensorBase<Units.Voltage>.IsSampling SensorBase<Units.Voltage>.UpdateInterval SensorBase<Units.Voltage>.RaiseEventsAndNotify(IChangeResult<>) SensorBase<Units.Voltage>.Read() ObservableBase<Units.Voltage>.observers ObservableBase<Units.Voltage>.NotifyObservers(IChangeResult<>) Meadow.Foundation.ObservableBase<Units.Voltage>.Subscribe(IObserver<>) Meadow.Foundation.ObservableBase<Units.Voltage>.CreateObserver(Action<>, System.Nullable<Predicate<IChangeResult<UNIT>>>)
Namespace Meadow.Foundation.ICs.ADC
Assembly Ads1x15.dll

Syntax

public abstract class Ads1x15 : SamplingSensorBase<Units.Voltage>

Constructors

Ads1x15(II2cBus, Ads1x15.Addresses, Ads1x15.MeasureMode, Ads1x15.ChannelSetting)

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

Declaration
protected Ads1x15(II2cBus i2cBus, Ads1x15.Addresses address, Ads1x15.MeasureMode mode, Ads1x15.ChannelSetting channel)

Parameters

Type Name Description
II2cBus i2cBus
Ads1x15.Addresses address

Address of the At24Cxx (default = 0x50).

Ads1x15.MeasureMode mode
Ads1x15.ChannelSetting channel

Properties

BitResolution

Resolution of the peripheral

Declaration
protected abstract int BitResolution { get; }

Property Value

Type Description
System.Int32

Channel

Gets or sets the ADC Channel settings (e.g. Single-Ended or Differential)

Declaration
public Ads1x15.ChannelSetting Channel { get; set; }

Property Value

Type Description
Ads1x15.ChannelSetting

Gain

Gets or sets the ADC Amplifier Gain

Declaration
public Ads1x15.FsrGain Gain { get; set; }

Property Value

Type Description
Ads1x15.FsrGain

InternalSampleRate

Declaration
protected int InternalSampleRate { get; set; }

Property Value

Type Description
System.Int32

Mode

Sets or gets the Measurement Mode. One-shot uses less power, but is slower.

Declaration
public Ads1x15.MeasureMode Mode { get; set; }

Property Value

Type Description
Ads1x15.MeasureMode

ReadShiftBits

Shift required for the conversion register (see Data Sheet for details)

Declaration
protected virtual int ReadShiftBits { get; }

Property Value

Type Description
System.Int32

Methods

ReadRaw()

Returns the last raw ADC conversion value

Declaration
public Task<int> ReadRaw()

Returns

Type Description
Task<System.Int32>

ReadSensor()

Reads the last ADC Conversion as a Voltage based on current Gain settings

Declaration
protected override Task<Voltage> ReadSensor()

Returns

Type Description
Task<Voltage>

Overrides

Meadow.Foundation.SensorBase<Units.Voltage>.ReadSensor()