Skip to main content

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​
TypeNameDescription
Meadow.Hardware.IPinpinThe pin to create the port on.
System.Int32sampleCountThe 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​
TypeNameDescription
Meadow.Hardware.IPinpinThe pin to create the port on.
System.Int32sampleCountThe number of samples to use for input averaging
System.TimeSpansampleIntervalThe 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​
TypeNameDescription
Meadow.Hardware.IPinpinThe pin to create the port on.
System.Int32sampleCountThe number of samples to use for input averaging
System.TimeSpansampleIntervalThe interval between readings
Meadow.Units.VoltagevoltageReferenceReference 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​
TypeNameDescription
Meadow.Hardware.IPin[]pinsThe pins to use for the IAnalogInputArray