After finishing the book, I would finally create my own project of Domotics.
Click to turn On or Off a LED light don't need no programming.
We will just create the circuit and test it:
- 1 switch
- 1 LED
- some connectors
In this project, we plug in the Arduino into a USB port or a 9-volt battery, the Arduino will provide 5 volts between its 5V pin and its ground pin that you can use.
Step 1:
Unplug Arduino of any power source
Step 2:
Connect a red wire to the 5V pin on the Arduino, and put the other end in one of the long bus lines in your breadboard. Connect ground on the Arduino to the adjacent bus line with a black wire
Step3:
Place your switch across the center of the board
Step4:
Use a 220-ohm resistor to connect power to one side of the switch
Step5:
On the other side of the switch, connect the anode (long leg) of the LED. With a wire connect the cathode (short leg) of the LED to ground

Now we plug the USB cable into the
Arduino and press the switch
No comments:
Post a Comment