Click or drag to resize

libspiagentspiagent_analog_get Method

Get analog input voltage.

Namespace: IO.Bindings
Assembly: libsimpleio (in libsimpleio.dll) Version: 2.2026.331.1
Syntax
C#
public static void spiagent_analog_get(
	uint pin,
	out float voltage,
	out int error
)

Parameters

pin  UInt32
Analog input pin number.
voltage  Single
Analog input voltage (0.0V to 3.3V).
error  Int32
Set to 0 upon success, or an errno error number upon failure.
Remarks
The resolution of the LPC1114 single chip microcontroller A/D converter is 10 bits, yielding measurements with at best 3 significant decimal digits. Its reference voltage and input span are the LPC1114 power supply voltage, nominally 3.3V. Absolute accuracy will therefore depend upon the accuracy of the power supply (under load!) that feeds the LPC1114.
See Also