Different Night Lights With Music
by Kaden_0704 in Circuits > Arduino
130 Views, 0 Favorites, 0 Comments
Different Night Lights With Music
Original source: https://www.instructables.com/Arduino-LED-Night-Li...
This product is for people that are difficult to fall asleep or people that are afraid of darkness. When they are going to sleep, they can turn on the night light. The night light has three types of functions. The first one occurs when you click the left button, the light is orange, which is in a medium brightness in my night lights. The second happens when you click the left button again. The lights will be lighter and it is white. In addition, it will play a short song twice so people can fall asleep quickly and easily. Also, when the music stop playing, all three lights will turn on. If people think it was too bright, they can click the right button and the light will turn blue, which is darker in all three. Moreover, if people want to switch the light to medium brightness, they can click the left button one more time to turn on the orange light.
-Important: the right button is functional only when the music stop playing.
Supplies
- 12 wires
- 1 speaker
- 2 buttons
- 5 resistors (2 blue, 3 yellow-brown)
- 3 LED lights (orange, blue, and white)
- 6 pin header
- 1 Arduino board
- 1 USB line
- 1 Computer
- 1 shoe box
- 1 utility knife
- 1 tape
- 1 pen
Set Up the Board
Set the board according to the image above.
1. Pin all D2, D3, D4, D5, and D6 with wires on the Arduino board.
2. Use the right resistor for buttons and LED lights
3. Pin the speaker in GND and D11.
4. 5V is connected to the breadboard with Arduino, the same as GND. Pin both of them in positive and negative signs on the breadboard.
5. Use the clip wires to clip LED lights' legs. The long one should be clip by positive, while the short should be clip by negative.
6. Place those 5 circuits(D2, D3, D4, D5, and D6) in the right place on the breadboard.
Uploading Codes
Code Link: https://create.arduino.cc/editor/kaden_0704/045a68...
Click the link for the code for this system. Upload to your Arduino board to start using it.
Start Making the Box and Finish
I used the utility knife to cut five holes. The bigger is for the speaker, which is at the bottom. The two bigger holes at the top are for the button. The three smaller holes are for the LED lights. Inside the box, I use the tape to stick those things tight so they will not move easily and will stay where they should be. The USB line will go in by the hole that the shoebox already has.
Finish!
Link for the video: https://drive.google.com/file/d/1_rolNfYwrd4D5N3vt...
Good job, you have made your own product. Watch the video to see if your product has looked the same as the product in the video.
Remember to turn on the sound when watching the video.