My wife is a Montessori teacher, and didn't want screens to be a part of his life until 6 years old. I wanted him to be able to choose his own music and play it as much as he wanted. This jukebox lets him do that without screens.
He just holds the card with the picture of the song/album near the jukebox and it starts playing...
Magic!
This is still evolving, the last evolution was:
- Raspberry Pi 3 + Case / Power $50
- USB Mifare Card Reader $16
- SD Card $11
- USB Flash Drive $8
- Mifare RFID cards $40
- Card protector sleeves $7
- Mini Remote Control $13
- Mini USB Cables $9
=> $154
Install NOOBS (https://www.raspberrypi.org/documentation/installation/noobs.md)
- top left Raspberry > Preferences > Raspberry Pi Configuration
- boot: To CLI
The structure for the USB Flash Drive is:
music/
1-my song.mp3
2-my other song.mp3
3-my album/
first album song.mp3
second album song.mp3
sounds/
i_am_listening.mp3
repeating_on.mp3
repeating_off.mp3
cards.txt
You can copy the sounds directory from this repository. And the cards.txt file will get generated for you.
You have to populate with music directory. All that's important is that every file or directory starts with a distinct number then dash.
create the mount
cd /mnt
sudo mkdir bigdaddy
sudo mount -o uid=pi,gid=pi /dev/sda1 /mnt/bigdaddy
sudo vi /etc/fstab
add this line:
/dev/sda1 /mnt/bigdaddy vfat uid=pi,gid=pi,umask=0022,sync,auto,nosuid,rw,nouser 0 0
Try it out, you should see everything on the flash drive under /mnt/bigdaddy
Run this:
sudo apt-get update
sudo apt-get install build-essential python-dev git
Run this:
sudo apt-get install alsa-utils mpg123
Reboot:
sudo reboot
Setup the audio port:
sudo modprobe snd-bcm2835
sudo amixer cset numid=3 1
Turn up the volume:
amixer set PCM -- -0000
create an ssh key
ssh-keygen
add your public key as a deploy key in the project
git clone https://github.com/jeremylightsmith/rpi-jukebox.git jukebox
try it by
jukebox/bin/jukebox
sudo vi /etc/rc.local
add this line:
/home/pi/jukebox/bin/jukebox &