Read digital value from a digital I/O pin.
ar - connected arduino object.
pin - string name of the pin to read.
value - the logical value (0, 1, true false) of the current pin state.
a = arduino ();
pinvalue = readDigitalPin (a, 'D5');
See also: arduino, writeDigitalPin.
Package: arduino