Characteristic Locus
Inheritance object ObservableBase<Voltage> SamplingSensorBase<Voltage> PollingSensorBase<Voltage> > Ads1x15Base > Ads1015 > Ads1115
Implements IObservable<IChangeResult<Voltage>> ISamplingSensor<Voltage> ISensor<Voltage> II2cPeripheral
Inherited Members PollingSensorBase<Voltage>.StartUpdating(TimeSpan?) PollingSensorBase<Voltage>.StopUpdating() SamplingSensorBase<Voltage>.samplingLock SamplingSensorBase<Voltage>.RaiseEventsAndNotify(IChangeResult<Voltage>) SamplingSensorBase<Voltage>.Read() SamplingSensorBase<Voltage>.SamplingTokenSource SamplingSensorBase<Voltage>.Conditions SamplingSensorBase<Voltage>.IsSampling SamplingSensorBase<Voltage>.UpdateInterval SamplingSensorBase<Voltage>.Updated ObservableBase<Voltage>.NotifyObservers(IChangeResult<Voltage>) ObservableBase<Voltage>.Subscribe(IObserver<IChangeResult<Voltage>>) ObservableBase<Voltage>.CreateObserver(Action<IChangeResult<Voltage>>, Predicate<IChangeResult<Voltage>>) ObservableBase<Voltage>.observers object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.ICs.ADC
Assembly Ads1x15.dll

Syntax

public abstract class Ads1x15Base : PollingSensorBase<Voltage>, IObservable<IChangeResult<Voltage>>, ISamplingSensor<Voltage>, ISensor<Voltage>, II2cPeripheral

Constructors

Ads1x15Base(II2cBus, Addresses, MeasureMode, ChannelSetting)

Create a new Ads1x15Base object using the default parameters for the component

Declaration
protected Ads1x15Base(II2cBus i2cBus, Ads1x15Base.Addresses address, Ads1x15Base.MeasureMode measureMode, Ads1x15Base.ChannelSetting channelSetting)

Parameters

Type Name Description
II2cBus i2cBus

The I2C bus

Ads1x15Base.Addresses address

Address of the At24Cxx (default = 0x50)

Ads1x15Base.MeasureMode measureMode

The measurement measureMode

Ads1x15Base.ChannelSetting channelSetting

The channel setting

Fields

i2cComms

I2C Communication bus used to communicate with the peripheral

Declaration
protected readonly II2cCommunications i2cComms

Field Value

Type Description
II2cCommunications

Properties

BitResolution

Resolution of the peripheral

Declaration
protected abstract int BitResolution { get; }

Property Value

Type Description
int

Channel

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

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

Property Value

Type Description
Ads1x15Base.ChannelSetting

DefaultI2cAddress

The default I2C address for the peripheral

Declaration
public byte DefaultI2cAddress { get; }

Property Value

Type Description
byte

Gain

Gets or sets the ADC Amplifier Gain

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

Property Value

Type Description
Ads1x15Base.FsrGain

InternalSampleRate

Get or set the internal sample rate

Declaration
protected int InternalSampleRate { get; set; }

Property Value

Type Description
int

Mode

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

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

Property Value

Type Description
Ads1x15Base.MeasureMode

ReadShiftBits

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

Declaration
protected virtual int ReadShiftBits { get; }

Property Value

Type Description
int

Methods

ReadRaw()

Returns the last raw ADC conversion value

Declaration
public Task<int> ReadRaw()

Returns

Type Description
Task<int>

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>

The voltage

Overrides