Introduction: PiPod Shuffle

🎧 PiPod Shuffle

The PiPod Shuffle is a DIY digital music player built using a Raspberry Pi. It automatically plays MP3 files from a local folder in order or shuffle mode, with simple keyboard controls. Designed to mimic the minimalist charm of the iPod Shuffle, it runs headless or with a GUI, and features:

  1. Automatic playback on boot
  2. Shuffle & skip controls via keyboard
  3. Favorite tracks system
  4. Freeze recovery to skip stuck songs
  5. Customizable, compact, and perfect for offline music listening!


Supplies

-Raspberry Pi, with audio jack. Must be able to run MPG123(ie. 2 or higher)

-Micro SD card or USB(If USB boot is enabled)

-Power source

-Phripherals(Mouse, screen, keyboard, headphones)

-MP3 files

Step 1: Prepare Your Music Folder

  1. On your Pi desktop, open the File Manager.
  2. Navigate to /home/pi (your home folder).
  3. Create a folder called Music if it doesn’t already exist.
  4. Copy your MP3 files into /home/pi/Music/ using drag-and-drop or USB.

Step 2: Install MPG123

Open a Terminal window on your Pi.

Run:

sudo apt update
sudo apt install mpg123


Step 3: Copy the PiPod Python Script

Create a new file play_music.py in your home folder:

  1. Right-click on the desktop or in your home folder and select New Document → Empty File.
  2. Name it play_music.py.
  3. Open it with a text editor (like Mousepad or Leafpad).
  4. Paste your PiPod Shuffle Python code inside and save.


Step 4: Run the PiPod Shuffle Script


  1. Open Terminal.
  2. Run:
python3 /home/pi/play_music.py
  1. You should hear your playlist start playing.
  2. Use keys while focused in terminal to control playback:
  3. n = next track
  4. s = toggle shuffle
  5. f = favorite current song


Step 5: (Optional) Autostart on Boot With GUI

If you want the PiPod Shuffle to start automatically when the Pi boots into desktop:

  1. Click the Raspberry menu → PreferencesAdd/Remove Software → search for “Startup Applications” and open it.
  2. Click Add.
  3. Name: PiPod Shuffle
  4. Command:
python3 /home/pi/play_music.py &
  1. Save and reboot your Pi to test.

Step 6: (optional) Enclosure

Sadly, Pi 3's don't fit into Altoids tins, but you could make one out of cardboard, laser cut wood, or make one with a 3d printer. I used an old green plastic box and modified it with tin snips.