Runs two services when the RPi is turned on, one to open a chromium browser to a Spotify playlist, another to monitor an arcade button for pressed events.
- virtualenvwrapper - virtual env
- pip-tools - package managment
On the Rpi:
$pip install virtualenvwrapper
Modify the bashrc:
nano ~/.bashrc
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV=~/.local/bin/virtualenv
export PATH=/usr/local/bin:$PATH
export WORKON_HOME=~/.virtualenvs
export VIRTUALENVWRAPPER_ENV_BIN_DIR=bin
source ~/.local/bin/virtualenvwrapper.sh
$source ~/.bashrc
$mkvirtualenv spotify_app
$workon spotify_app
$pip-compile requirements.in
$pip install -r requirements.txt
$sudo apt-get install gpiod libgpiod-dev libgpiod-doc
export CFLAGS=-fcommon
pip3 install RPi.GPIO
starts the spotify in browser:
/etc/systemd/system/startupbrowser.service
starts the python script listening for button presses
/etc/systemd/system/spotify_button.service