Portable Music Player – Take your music with you, anywhere with the PiJuice Maker Kit
This project is designed to show you some of the very cool features of the PiJuice Make Kit case, which includes a PiJuice HAT, Media Centre HAT and a very cool case to fit it all in. This project is a portable music player, just the like the old days of MP3 players. The project uses software from Max2Play, including the Jivelite display add on for small screens such as the media centre HAT. We are able to control the display using the media center’s touch display interface or if you prefer you can control the menu using the toggle joystick.
What you need
- Raspberry Pi computer
- PiJuice Maker Kit
How to assemble your kit
Step 1 – First, you will need to separate the top half and bottom half of the Maker Kit case. You can do this easily by pushing the two shorter sides outwards and lifting upwards, sliding the top half up. The sides of the case are designed to give a little flex.
Step 2 – Before we assemble the Pi, PiJuice and Media Centre HAT, if you are going to use the joystick on the Media Centre HAT to navigate the menu then you will need to solder this to the HAT board. Solder it in place, labelled B1 on the HAT board. The joystick switch can be used to navigate Up, Down, Left, Right and pushdown in the centre to enter.
Step 3 – Add the PiJuice HAT to your Raspberry Pi board. Make sure that it is firmly pushed down on the GPIO pins.
Step 4 – Now we can add to the PiJuice HAT GPIO pins, the Media Center HAT. Push the GPIO connector on the Media Center HAT down as far as it can go.
Step 5 – Now take the Raspberry Pi with the PiJuice and Media Center HAT on and slide it into the case, making sure it aligns up with the grooves either side and also the connectors line up with the cutouts on the side of the case. Remember that the case can flex slightly either side to make it easier.
Step 6 – If you look inside the top half of the case you will see that there are some pre-cut inserts that can be pushed through with a pointed object for the buttons. Push through the larger cutout hole for use with the joystick. Then carefully slide over the top, the top half of the make kit case. Slide it over the top and you should hear it click into place once it has aligned.
Installing the software
Step 1 – The main software we are using for this project is from Max2Play. You will need to go to their download page and download the latest OS image for your Raspberry Pi device. Once downloaded you can then flash the OS image to your micro SD card using Balena Etcher.
Step 2 – Insert the SD card into the Raspberry Pi and connect a HDMI cable. Once power has been applied it will begin to boot into the desktop.
Step 3 – Now we need to connect to the internet so we can install the software for the Media Center HAT. There are a couple of ways in which we can do this. You can connect an Ethernet cable to the Raspberry Pi or we can connect to the wi-fi. The Max2Play will automatically create a Wi-Fi hotspot if no ethernet or Wi-Fi connection is avialble. This will allow us to connect to it from a computer and access the configuration page of Max2Play where you can configure the Wi-Fi if that indeed is what you want to use.
If you have connected to the Wi-Fi hotspot you can open up your browser and got to: http://max2play.local/
Click on “WiFi/LAN” to configure your Wi-Fi.
Step 4 – Now we can install the Media Center HAT. You can either connect to your Raspberry Pi using SSH from another computer (SSH is enabled by default) or in the Desktop you can open up a terminal window. The default credentials for SSH connection is:
Once in the command line enter the following command to install the Media Center HAT software:
curl -sSL https://raw.githubusercontent.com/ChristopherRush/Media-Center-HAT/master/Software/max2play.sh | sudo bash
Once installed reboot the Raspberry Pi and remove the HDMI cable. Max2Play will now boot to the desktop on the Media Center HAT.
Step 5 – Enable Jivelite. Jivelite is the interface that we are going to use with the Media Center HAT display. Open up your browser and access the max2play configuration page. Head over to tab “jivelite”.
On the configuration page for jivelite select “Autostart jivelite” and “Autohide Panel (Taskbar) and set Jivelite to Fullscreen“, then click save for both options. Scroll a bit further down the page and under “Install further svelte skins” select the option in the drop down box “port for 2.8 320×240 Adafruit LCD…..” then click on “Install Chosen Skin“.
Step 6 – Install Squeezebox server (optional). Squeezebox is a streaming software which allows you to stream from internet radio or from a network server to your device. In the tab menu of max2play click on “Squeezebox Server“.
Scroll down to “Squeezebox Start installation server” and select the latest version of Squeezebox from the drop down box. Then once selected click on “Squeezebox server start installation“.
Finally select “Auto start squeezebox server” and save setting.
Step 7 – Install PiJuice Software. Installing the PiJuice software will allow you to shutdown the Raspberry Pi when power gets low or at least warn you with the colour of the LED on the PiJuice HAT.
Reboot your Raspberry Pi and it should automatically launch jivelite with squeezebox server.
You can now use the navigation button on the Media Center HAT to navigate the menu and select your audio music.