Skip to main content

Interface IObservableAnalogInputController

Contract for devices that expose IAnalogInputPort(s).

Assembly: Meadow.Contracts.dll
View Source
Declaration
public interface IObservableAnalogInputController : IAnalogInputArrayController, IAnalogInputController, IPinController

Fields

DefaultA2DReferenceVoltage

The default Analog to Digital converter reference voltage.

View Source
Declaration
public const float DefaultA2DReferenceVoltage = 3.3

Methods

CreateAnalogInputPort(IPin, Voltage?)

View Source
Declaration
IAnalogInputPort CreateAnalogInputPort(IPin pin, Voltage? voltageReference = null)
Returns

Meadow.Hardware.IAnalogInputPort

Parameters
TypeName
Meadow.Hardware.IPinpin
System.Nullable<Meadow.Units.Voltage>voltageReference

CreateAnalogInputPort(IPin, int)

Initializes the specified pin to be an AnalogInput and returns the port used to sample the port value.

View Source
Declaration
IObservableAnalogInputPort CreateAnalogInputPort(IPin pin, int sampleCount)
Returns

Meadow.Hardware.IObservableAnalogInputPort

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
IObservableAnalogInputPort CreateAnalogInputPort(IPin pin, int sampleCount, TimeSpan sampleInterval)
Returns

Meadow.Hardware.IObservableAnalogInputPort

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
IObservableAnalogInputPort CreateAnalogInputPort(IPin pin, int sampleCount, TimeSpan sampleInterval, Voltage voltageReference)
Returns

Meadow.Hardware.IObservableAnalogInputPort

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.