Automatic Music Player

by Sydneyyy_wang in Circuits > Arduino

364 Views, 0 Favorites, 0 Comments

Automatic Music Player

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!!!!!

Supplies

- An Arduino Leonardo board

- 6 wires

- 1 light sensor

- 1 1K Ohm Resistor

- 2 alligator clips (optional)

- A laptop (Mac)

- A USB cable

Basic Setup + Creating the Keyboard Circuit

Screen Shot 2020-05-27 at 8.46.30 PM.png
E6FDC563-83BB-4BA3-B25F-29F7C1CEAD57.jpeg

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.

Creating the Photoresistor Circuit

Screen Shot 2020-05-27 at 9.02.46 PM.png
7E4706B9-2440-4BF0-A46B-A8EAE0CAF373.jpeg

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.

The CODE!

Press the link below to get full code!!!!

https://create.arduino.cc/editor/sydneyyy_wang/40d...

Decorating Time

C9446224-9828-42B5-B53C-FD584DC35C5C.jpeg
4C2A4F96-2CDA-42AE-89AD-C4ACF87F4C2E.jpeg
78F15320-4324-4A64-9B67-CF1D7CE07B23.jpeg
F024547B-37E8-48F2-B14D-AB0A03D45CB8.jpeg

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.

Final Result!!!

Automatic Music Player

YAYYYYY now you have your automatic music player machine!!