Class Ads1x15Base
Base class for the Ads1x15 family of analog-to-digital (ADC) converters
Assembly: Ads1x15.dll
View Source
public abstract class Ads1x15Base : PollingSensorBase<Voltage>, IObservable<IChangeResult<Voltage>>, ISamplingSensor<Voltage>, ISensor<Voltage>, ISensor, ISamplingSensor, II2cPeripheral
Inheritance: System.Object
-> Meadow.Foundation.ObservableBase<UNIT> -> Meadow.Foundation.SamplingSensorBase<UNIT> -> Meadow.Foundation.PollingSensorBase<UNIT>
Derived:
Meadow.Foundation.ICs.ADC.Ads1015, Meadow.Foundation.ICs.ADC.Ads1115
Implements:
System.IObservable<Meadow.IChangeResult<Meadow.Units.Voltage>>
, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Voltage>
, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Voltage>
, 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; }
BitResolution
Resolution of the peripheral
View Source
protected abstract int BitResolution { get; }
ReadShiftBits
Shift required for the conversion register (see Data Sheet for details)
View Source
protected virtual int ReadShiftBits { get; }
InternalSampleRate
Get or set the internal sample rate
View Source
protected int InternalSampleRate { get; set; }
Channel
Gets or sets the ADC Channel settings (e.g. Single-Ended or Differential)
View Source
public Ads1x15Base.ChannelSetting Channel { get; set; }
Gain
Gets or sets the ADC Amplifier Gain
View Source
public Ads1x15Base.FsrGain Gain { get; set; }
Mode
Sets or gets the Measurement Mode One-shot uses less power but is slower
View Source
public Ads1x15Base.MeasureMode Mode { get; set; }
Fields
i2cComms
I2C Communication bus used to communicate with the peripheral
View Source
protected readonly II2cCommunications i2cComms
Methods
ReadSensor()
Reads the last ADC Conversion as a Voltage based on current Gain settings
View Source
protected override Task<Voltage> ReadSensor()
Returns
System.Threading.Tasks.Task<Meadow.Units.Voltage>
: The voltage### ReadRaw()
Returns the last raw ADC conversion value
View Source
public Task<int> ReadRaw()
Returns
System.Threading.Tasks.Task<System.Int32>
Implements
System.IObservable<Meadow.IChangeResult<Meadow.Units.Voltage>>
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Voltage>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Voltage>
Meadow.Peripherals.Sensors.ISensor
Meadow.Peripherals.Sensors.ISamplingSensor
Meadow.Hardware.II2cPeripheral