Update your browser to view this website correctly. Update my browser now
Demonstrates the use of INPUT_PULLUP with pinMode()
Making Input Pullup Serial tuto
This example demonstrates the use of INPUT_PULLUP with pinMode(). It monitors the state of a switch by establishing serial communication between your Arduino and your computer over USB.
Additionally, when the input is HIGH, the onboard LED attached to pin 13 will turn on; when LOW, the LED will turn off.