Introduction: Control Built-in LED Using Push Button With Arduino Nano
Arduino has a built-in LED on digital pin 13. Now we will control it using the push button.
Let's make it!
Supplies
1. Arduino Nano
2. Female to female jumper cable (3 pcs)
3. Mini USB cable
4. 220 Ohm resistor
5. Breadboard
Step 1: Wiring
Follow the wiring diagram as shown.
5 V --> one leg of push-button
Gnd --> one leg of the resistor
D2 --> the other leg of the resistor
Step 2: Code and Upload
1. Copy the code from here: Sketch
2. Paste it on the Arduino IDE
3. Connect the mini USB cable to Arduino Nano
4. Connect the USB cable to your computer
5. Click the upload button and wait for it to finish
Step 3: Do the Magic!
Push the button and see how the magic works