Syntax
public abstract class Ads1x15Base : PollingSensorBase<Voltage>, ISamplingSensor<Voltage>, ISamplingSensor<Voltage>
Constructors
Ads1x15Base(II2cBus, Ads1x15Base.Addresses, Ads1x15Base.MeasureMode, Ads1x15Base.ChannelSetting)
Create a new Ads1x15Base object using the default parameters for the component.
Declaration
protected Ads1x15Base(II2cBus i2cBus, Ads1x15Base.Addresses address, Ads1x15Base.MeasureMode mode, Ads1x15Base.ChannelSetting channel)
Parameters
Type | Name | Description |
---|---|---|
II2cBus | i2cBus | |
Ads1x15Base.Addresses | address | Address of the At24Cxx (default = 0x50). |
Ads1x15Base.MeasureMode | mode | |
Ads1x15Base.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 Ads1x15Base.ChannelSetting Channel { get; set; }
Property Value
Type | Description |
---|---|
Ads1x15Base.ChannelSetting |
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 |
---|---|
System.Int32 |
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 |
---|---|
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.SamplingSensorBase<Voltage>.ReadSensor()