Description
Configures the specified pin to behave either as an input or an output. See the Digital Pins page for details on the functionality of the pins.
It is possible to enable the internal pullup resistors with the mode INPUT_PULLUP
. Additionally, the INPUT
mode explicitly disables the internal pullups.
Syntax
pinMode(pin, mode)
Parameters
pin
: the Arduino pin number to set the mode of.
mode
: INPUT
, OUTPUT
, or INPUT_PULLUP
. See the Digital Pins page for a more complete description of the functionality.
Returns
Nothing