Arduino Tutorial | Digital Read Serial

Arduino Tutorial | Digital Read Serial This example shows you how to monitor the state of a switch by establishing serial communication between your Arduino or Genuino and your computer over USB. Hardware Required Arduino or Genuino Board A momentary switch, button, or toggle switch 10k ohm resistor hook-up wires breadboard Circuit image developed using Fritzing . For more circuit examples, see the Fritzing project page Connect three wires to the board. The first two, red and black, connect to the two long vertical rows on the side of the breadboard to provide access to the 5 volt supply and ground. The third wire goes from digital pin 2 to one leg of the pushbutton. That same leg of the button connects through a pull-down resistor (here 10k ohm) to ground. The other leg of the button connects to the 5 volt supply. Pushbuttons or switches connect two points in a circuit when you press them. When the pushbutton is open (unpressed) there is no connection betw...