Automatic Induction Night Light
by LiuLiu0112 in Circuits > Arduino
210 Views, 0 Favorites, 0 Comments
Automatic Induction Night Light
This Automatic Induction Night Light is base on https://www.instructables.com/id/Arduino-Light-Th... I changed the number of the LED and the requirement of the brightness that makes the LED light up. I also adding more LEDs with different colors.
Code Link: https://create.arduino.cc/editor/liuliu0112/ccad18...
Arduino YT Link: https://www.youtube.com/watch?v=e8ujd8CNkvg
Introduction and Materials
Use a photoresistor to determine the brightness of the environment. There are only two different parts. If it is dark, more LEDs will light up; if it is bright, fewer LEDs will light up.
The items needed to create this Automatic Induction Night Light
- Arduino
- Computer or charging
- LED (white, green, yellow, red)
- Photoresistance
- Resistor
- Tape
- Cardboard
- Wire
First Section of the Process
You're going to prepare 7 LED (2 White, 2 Green, 2 Yellow, and 1 Red), 23 wires, and 8 Resistors, and 1 Photoresistor.
- Placing 7 LEDs in the Arduino in order. From left to right is White, Green, Yellow, Red.
- Placing 7 Resistors in corresponding LEDs.
- Placing 7 wires in corresponding LEDs to the Digital Pins. From left to right is D8,D7,D6,D5,D4,D3,D2
- Adding 1 Photoresistor on the right, also add one blue Resistor, Positive Electrode to A5, Negative Electrode to A0)
Coding Part 1
For coding, we first make the part of the LED to the Digital Pins. That we know which LED is connect to the Digital Pin, and we can set up basic on these codes. And we also set up the input and output of each LED.
Coding Part 2
After we set up the LED and other basic information and code. Our purpose of this work is to induction the lightness or the darkness from the environment base on the Photoresistor because I have a total of 7 LEDs, that we will change the requirement of each LED to light up. From the environment of brightest to darkest, is from the White LEDs, Green LEDs, Yellow LEDs, and last Red LED.
Combine the Coding Together
After finishing the coding and connect all parts, we combine it's together and try if it can work or not. And making shell and packaging to look it better.