Raspberry PI Digital/Optical Music Player
by fleahayden in Living > Music
20 Views, 1 Favorites, 0 Comments
Raspberry PI Digital/Optical Music Player
This is how to make a simple audio player capable of playing FLAC/Mp4s from a flash drive or CDs from a USB CD/DVD drive. It's something handy and cheap to make, so you don't need to go out and buy a full blown CD player that might not even have USB music as an option. Also, I use the Note function on some of my images so be sure to look out for them, to find potential helpful information.
Supplies
-Raspberry PI 4b (~$60)
-USB CD/DVD drive (~$18)
-Monitor and mouse to use temporarily to set up the PI
-Your own listening device/speakers
-3.5 touch screen (~$28)
Screen I used:
https://www.amazon.com/dp/B083C12N57
Assembly
The first thing I had to do was assemble the screen and enclosure. It starts with simply screwing down the board to the lower case, and then attaching a small fan included with the screen, to the screen. The screen I got came with instructions and was pretty easy to put together.
Coding + Setup
After assembling, you need to get the code for making the screen work. First plug the PI into a monitor and open the terminal to type the code below that I got from the manufactures website.
LCD Code. After installing HDMI may turn off.
To swap back to HDMI use the following code, however we will not need it for this project. Just might be helpful for the future to know.
Next is a touch screen calibration app. Use the following to install.
Now click the top left raspberry icon and scroll and look for touch screen calibration app, complete it and then you're set.
If the code does not work, or you need some extra help, the following link is to the manufacturers website that has some extra info that might be helpful.
https://wiki.52pi.com/index.php?title=K-0403#Download_Image
Opening VLC
To open VLC you can follow the image, just tap the raspberry icon, go to sound, and select VLC. The window may appear too large for the small screen so take the time to resize it to something more manageable. If needed it might be easier to use a mouse to resize initially, and then once it's resized you can use the touch controls easier.
USB MUSIC
To play music from a usb stick first load up a stick with your music, and you can organize however you want, but the more subfolders you have the more tapping around you will have to do. I would recommend having a large folder that you shuffle through or organize by artist. Now you just need to plug it into the PI and navigate using the images to find your files. You can see the steps by clicking through the images above.
Using the USB CD Drive
To play a CD in VLC I found that opening the VLC app and just inserting a disc causes it to play automatically. For me it takes a minute for the cd to start playing, and you can see a yellow loading bar of sorts. Although it may be slower or faster depending on the drive you have.