AnalogIn¶
-
class
AnalogIn¶ Public Functions
-
AnalogIn(ADCPinName pin)¶ Construct a new Analog In object.
- Parameters
pin:
-
~AnalogIn()¶ Destroy the Analog In object.
-
uint32_t
read()¶ Returns the current ADC register value.
- Return
uint32_t
-
uint16_t
read_u16()¶ Returns the current 16-bit ADC register value.
- Return
uint16_t
-
float
getVoltage()¶ Returns the current voltage applied to the pin.
- Return
float
-
float
getPercent()¶ Returns the current ADC value scaled 0-100%.
- Return
float
-