Arduino Toolkit - @arduino/readAnalogPin


: value = readAnalogPin (ar, pin)

Read analog voltage of pin.

Inputs

ar - connected arduino object.

pin - string name of the pin to read.

Outputs

value - analog value of the pin

Example

 
 ar = arduino ();
 readAnalogPin(ar, "A4");
 ans = 
     87
 
 

See also: arduino, readVoltage.