Arduino Night Light
I edited from Arduino Turn on Led Using Button by mehmetsukru
Originally, you hold the button (there's only one) the light will be on, and it will not light when released. I change to two buttons. One is for turning on the light, and another is for turning off, like a night light.
List:
- Light bulb x1
- Male to male breadboard jumper wires
- Resistors x1
- Arduino Leonardo
- Breadboard
- Buttons x2
- A bag
To Get Started
This is very simple!
- Connect one button to pin 2 and positive electrode (+)
- Connect another button to pin 3 and +
- Connect 5v to the +
- Connect GND to the negative electrode (-)
- Connect one foot of the light to the negative electrode (-) , insert resistor's one foot on the same row (straight row).
- Connect to pin 9 with the other foot of the resistor (straight row)
- Use a bag to cover the wires
Assembly Completed!!
Code
https://create.arduino.cc/editor/meganlin123/bad89814-60c4-49e6-a5e4-bc103f77dacf/preview
WELL DONEļ¼