Set/Get pin mode for a specified pin on arduino connection.
configurePinResource (ar, pin) will get the current mode of the specified pin.
configurePinResource (ar, pin, owner, mode) will attempt set the pin to the specified mode and owner.
If the pin is already owned by another owner, the configure will fail unless the force option is used. If the mode is already set, configure will fail unless force is used.
ar - the arduino object of the connection to an arduino board.
pin - string name of the pin to set/get the mode of.
mode - string mode to set the pin to.
owner - string name to use as the pin owner.
force - boolean to force mode change. If not set, it will be false.
currmode - current string mode of the pin.
Valid modes can be:
See also: arduino, configurePin.
Package: arduino