I am an aspiring Computer Engineering Student and love to work on hardware with software projects.
Don't wanna be here? Send us removal request.
Text
Raspberry Pi: A music player!

Since some of you might be unfamiliar with such a device, I will try my best to be as detailed as possible.
Things you will need:
Raspberry Pi 3 (any model will do: A / A+ / B / B+). I used model B (v1.2) for this project. I would recommend you to purchase a case for this device. This is mainly because the mother board is completely exposed and an accidental fall might result in the dismantling or breakage of crucial components.
A speaker with 3.5 mm headphone jack to stream music from the Pi.
A SD-Card with a minimum storage of 8 GB and preferably class 10 to install the Raspbian firmware.
Either a PC or Mac to download and install the Raspbian firmware on Pi.
A HDMI cable to display the Raspbian software and configure the set up.
Monitor/TV to display the Raspbian software.
A mouse and USB keyboard to input the commands.
Wi-Fi USB Adapter to have internet access.
Lastly, a USB Sound card to switch the audio output.
Initial setup of Rasberry Pi:
First and foremost, you need to install the Raspbian software to run the Pi. You can find and download the software on this link. Follow the instructions as prompted and it should be pretty straightforward.
After its successful installation, install Win 32 Disk Imager or a similar software to format the SD card and transfer the .img file downloaded to the SD Card. Then proceed with formatting the SD Card and installation of the software. Insert the SD card in the Pi and connect the Pi to your TV/Monitor via HDMI cable. Lastly, connect the Pi to a wall socket through a charging adapter and the mouse, keyboard through the USB ports on the Pi.
Once the Pi is powered up, it should boot up on its own and if you see a series of commands like pop up, don’t worry! It’s all part of the booting process and shouldn’t take too long.
Configuration of miscellaneous settings:
Start by connecting the Wi-Fi adapter to the Pi through USB ports and click on the blue Wi-Fi logo on the top right corner of the screen (similar to MacOS) and connect to your home network.
Then, set up the sound card by firstly launching LXTerminal on Raspbian. This can be easily found on the top left corner represented by a desktop logo. On LXTerminal, type the following command: aplay -l
If the Raspbian names your USB Sound card upon typing the command above, it means the sound card has been recognized successfully and we can proceed to configure other audio settings. So, as you can see in the picture below, my sound card (‘Sound Blaster Play! 2′) was successfully recognized by the Pi.

After this, type Alsamixer to change the audio output. Press F6 on your keyboard and switch the audio output from ‘DEFAULT’ to your Sound Card.

You are almost there. Read on to the final steps:
Its time to test the audio. To do so, hit Esc to exit the Alsamixer mode and return back to the LXTerminal. Then type speaker-test and your speakers should play a tone right away.
And that’s it! You can head over to Rasberry Pi’s browser application and play music which will we played through the speakers. If you wish to stream music using online streaming services, such as Spotify, google play music, sound cloud, etc., you may download Pi MusicBox v0.6 which will automatically detect sound cards connected and stream music.
And that’s it! You have just turned your Rasberry Pi into a streaming music player! Wasn’t this easy? I am sure you would be proud of your invention now!!
------------------------------------------------------------------------------------------
There are endless project one could image with a Raspberry Pi and its opensource nature uplifts its ultimate potential. As such I have also done projects such as the automatic plant watering system (Pic 1 below) and the integrated sensor wireless communication through the XBee interface (Pic 2 below). So now I need not have to worry about my plants’ health whenever I travel for vacation and the wireless data transmission has taught me so much about electronic interfaces and transmission signals! Stay turned to my posts as I will write on them soon.
Picture 1: Automatic Plant Watering System via moisture sensor

Picture 2: XBee Wireless Transmission setup for sensor data
3 notes
·
View notes