Controlling LED by Using Button
by chenmia0724 in Circuits > Arduino
110 Views, 0 Favorites, 0 Comments
Controlling LED by Using Button
Using button to control LED on / off.
Supplies
-Arduino Leonardo board * 1
- USB cable * 1
- Resistor (10kΩ) * 1
-LED * 1 - Button * 1
- Capacitor 104 * 1
-Breadboard * 1
-Jumper wires
Prepare All the Supplies You Will Need
Procedures
Step 1: Build the circuit.
Step 2: Download the code from: https://github.com/primerobotics/Arduino
Step 3: Upload the sketch to the Arduino board.
Source of inspiration: https://www.instructables.com/Controlling-LED-by-B...
The Code
Result!!