Raspberry PI Digital/Optical Music Player

by fleahayden in Living > Music

20 Views, 1 Favorites, 0 Comments

Raspberry PI Digital/Optical Music Player

20251201_112707.jpg

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

Capture.JPG

-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

20251128_193903.jpg

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.

sudo rm -rf LCD-show
git clone https://github.com/goodtft/LCD-show.git
chmod -R 755 LCD-show
cd LCD-show/
sudo ./LCD35-show

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.

cd LCD-show/
sudo ./LCD-hdmi


Next is a touch screen calibration app. Use the following to install.

cd LCD-show/
sudo dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb


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

20251208_152411.jpg

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

20251208_152422.jpg
20251208_161647.jpg
20251208_161707.jpg
20251208_161720.jpg
20251208_161731.jpg

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.