Part of retroversion project.
Currently, the project is capable of scanning a QR code, and uses a manually constructed mapping (map.csv) to get the Spotify URI. It then plays the music.
- Power up Raspberry Pi
- Connect webcam and Arduino
- Connect to HiFi Audio system
- ssh into raspberry pi
- navigate to ~/arduino-music-control
./start.sh
A tmux session is now started with three running programs:
mopidy
(music player)./driver.sh
(listens to arduino buttons)./client.sh
(webcam, read qr code, send commands to mopidy)
You can already use it! Place a QR code on the scanner surface, and press the "Read QR" button on the Arduino. Wait a little while, and music starts playing.
Do you want to see the internals?
tmux a -t music
ctrl-b n
to navigate to next windowctrl-b d
to detach from tmux
driver.py
uses Nanpy to communicate and control Arduino. When buttons are registered, the signal is passed on via ZeroMQ to music_client.py
. There, the webcam is started and the photo is passed on to zbarimg
to find QR code. When found, if it is in map.csv
, its Spotify URI is passed to Mopidy via mpc
commands.