: voltage = readVoltage (ar, pin)

Read analog voltage of a pin.

Inputs

ar - connected arduino.

pin - pin name or number to query for voltage

Outputs

voltage - scaled pin value as a voltage

Example


ar = arduino ();
readVoltage(ar, "A4");
ans = 
    1.401

See also: arduino, readAnalogPin.

Package: arduino