readVoltage

Reads the input voltage from a specified analog pin.

AnalogIn.swift:168
func readVoltage() -> Float

Returns

A float value in the range of 0.0 to the reference voltage.