Presentation is loading. Please wait.

Presentation is loading. Please wait.

Buttons.

Similar presentations


Presentation on theme: "Buttons."— Presentation transcript:

1 Buttons

2 Overview Any device used to break or complete a circuit
The design engineer decides which device should be used for each specific circumstance A switch is a type of “latching” button

3 Arduino The goal of the button is to alter the voltage entering the digital pins A microcontroller sees CHANGES in voltage If the pin normally has 0V, then pressing a button should connect it to 5v

4 Arduino Button Pins opposite each other are always connected
Pressing the button connects to 2 pins on the left to the 2 pins on the right

5 Circuit

6 Circuits – Normally LOW
D2 is normally connected to ground through the unpressed button

7 Circuits – Normally LOW
When the button is pressed, the 5V side of the button connects to D2 The resistor prevents a short circuit between 5V and ground when the button is pressed

8 Coding

9 Coding Or more simply

10 Complete the Button lab in the book


Download ppt "Buttons."

Similar presentations


Ads by Google