Hardware 14
Hardware
3.3: Ways to Wire Up Inputs
Buttons A button or switch can be made by simply using any two pieces of metal and touching them
together, but they can be made in many shapes and sizes. The button can be placed between 5V and an
analog input pin (A0 for example). For a more reliable button, it can be connected like in the gure below.
Try pressing the button. Does it do anything? Try dierent combinations of the button to see how it works.
Lesson 3, Figure 2
Potentiometers normally have the same layout, with three places to connect wires (Lesson 3, Ficure 3).
5V
GND
Button
Lesson 3, Figure 3
A0
5V
GND
Potentiometer
Resistor
Resistor
A0