Interface IAnalogInputController
Contract for devices that expose IAnalogInputPort(s)
.
Assembly: Meadow.Contracts.dll
View Source
Declaration
public interface IAnalogInputController : IPinController
Fields
DefaultA2DReferenceVoltage
The default Analog to Digital converter reference voltage.
View Source
Declaration
public const float DefaultA2DReferenceVoltage = 3.3
Methods
CreateAnalogInputPort(IPin, int)
Initializes the specified pin to be an AnalogInput and returns the port used to sample the port value.
View Source
Declaration
IAnalogInputPort CreateAnalogInputPort(IPin pin, int sampleCount)
Returns
Meadow.Hardware.IAnalogInputPort
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The pin to create the port on. |
System.Int32 | sampleCount | The number of samples to use for input averaging |
CreateAnalogInputPort(IPin, int, TimeSpan)
Initializes the specified pin to be an AnalogInput and returns the port used to sample the port value.
View Source
Declaration
IAnalogInputPort CreateAnalogInputPort(IPin pin, int sampleCount, TimeSpan sampleInterval)
Returns
Meadow.Hardware.IAnalogInputPort
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The pin to create the port on. |
System.Int32 | sampleCount | The number of samples to use for input averaging |
System.TimeSpan | sampleInterval | The interval between readings |
CreateAnalogInputPort(IPin, int, TimeSpan, Voltage)
Initializes the specified pin to be an AnalogInput and returns the port used to sample the port value.
View Source
Declaration
IAnalogInputPort CreateAnalogInputPort(IPin pin, int sampleCount, TimeSpan sampleInterval, Voltage voltageReference)
Returns
Meadow.Hardware.IAnalogInputPort
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The pin to create the port on. |
System.Int32 | sampleCount | The number of samples to use for input averaging |
System.TimeSpan | sampleInterval | The interval between readings |
Meadow.Units.Voltage | voltageReference | Reference maximum analog input port |
voltage in Volts. Default is 3.3V. |
CreateAnalogInputArray(params IPin[])
Creates an IAnalogInputArray instance from the specified set of pins
View Source
Declaration
IAnalogInputArray CreateAnalogInputArray(params IPin[] pins)
Returns
Meadow.Hardware.IAnalogInputArray
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin[] | pins | The pins to use for the IAnalogInputArray |