Arduino Toolkit - @arduino/validatePin
- : validatePin
(ar, pin, type)
Validate that the mode is allowed for specified pin
If the mode is not valid, and error will be thrown.
Inputs
ar - connected arduino object
pin - name of pin to query mode validity of
mode - mode to query
Known modes are:
- ’I2C’
- ’SPI’
- ’PWM’
- ’Servo’
- ’analog’
- ’digital’
See also: arduino, configurePin.