Lesson goal: Read a digital input from the Arduino (a 1 or 0 only)

Previous: Make an etch-a-sketch | Home | Next: Read a push-button switch

This lesson will show you how to read a digital input from one of the digital inputs (2..13) on the Arduino.
Move the mouse over a dotted box for more information.

Now you try. Read digital inputs from the outside world. Note the values returns are either a 1 or a 0. This is the raw nature of digital information.

Type your code here:

See your results here: