Elegoo Arduino R3 Uno: How to make a light turn on using a button

Prius Power Button by Thom Watson is licensed under CC BY-NC-SA 2.0

“Prius Power Button” by Thom Watson is licensed under CC BY-NC-SA 2.0

By: Thomas sites, Reporter

This project I found and used the code for it, I found through the instructions used in the link below.

The first thing you want to do is get all your parts needed for this project.

1 red led

1 push button

1 resistor

7 wires

1 bread board

obviously your Arduino

Making the circuit

The first step is to put your led in the right place put short end in thirteen and the long one in ground(GND).

Next put your bread board on the right of the Arduino and connect a wire from 2 on the Arduino to b4 on the bread board. Next is to put the button in you put the top left corner of the button is in e2. Then it is time to put in the resistor, the resistor will connect g4 and g8 on the bread board. Now it is time for all the other wires. First is you want to connect 5v on the Arduino to the hole right next to the – on the bottom. Next you connect the ground next to the 5v to the hole under the one we just did. Now take another wire and connect j2 to the hole right under it and then take another wire and connect j8 to the positive whole on the very bottom under it. Now down to the last two wires connect the connect the second to last positive hole on the right to the one on the bottom and do the with the negatives to the right of it then that is your circuit. The last part is to write the code or copy it from the link below and you have yourself and working button light.

 

Arduino instructions