Introduction: Automatic Music Player
Have you ever feel like playing soft music to help your body relax and prepare for sleep? Whenever you feel tired after hours of work on your laptop, leave you laptop open and just turn off the light and jump on the bed. This machine will automatically switch and play the selected music playlist on YouTube and later switch the screen to a black background. Therefore, you don't have to worry about the screen being too bright and disturb your sweet dreams. If you're now craving for this wonderful machine, please scroll down for detailed instructions!!!!!
- An Arduino Leonardo board
- 6 wires
- 1 light sensor
- 1 1K Ohm Resistor
- 2 alligator clips (optional)
- A laptop (Mac)
- A USB cable
Step 1: Basic Setup + Creating the Keyboard Circuit
In order to make this Arduino board to function, it is important to place a wire connecting GND to the negative charge and another wire connecting 5V to the positive charge.
Next, simply place a wire connecting GND (the upper row) to D4 to ensure the laptop detects signals from the code and the Arduino board.
Step 2: Creating the Photoresistor Circuit
First, place a wire connecting the positive charge to a random pin on the breadboard. Then, place one end of the photoresistor below the row where you put the first wire and another end on the next (right) row. Next, place one end of the resistor below the row where you put the photoresistor, and another end on the next (right) row. At this point, place a wire connecting the A0 pin on the Arduino board and the pin below the row where an end of the photoresistor and the 1K Ohm resistor overlaps. Last, place a wire connecting the negative charge to the pin below the row where the right leg of the 1K Ohm resistor is placed.
Step 3: The CODE!
Press the link below to get full code!!!!
Step 4: Decorating Time
Decorate this machine and make it as professional as possible since this technology is applicable to every student who is stressful after completing hours of school works.
I placed the Arduino board inside a box and poked two holes, one at the middle to place the photoresistor to detect brightness of the environment (using two alligator clips to clip the legs of the photoresistor in order to place it through the hole on the box), and one at the bottom to connect the USB cable to the laptop and the plug on the Arduino board.
Step 5: Final Result!!!
YAYYYYY now you have your automatic music player machine!!