Skip to content
project-owner edited this page Mar 6, 2019 · 11 revisions

Prepare Flash Card

The recommended Micro SD flash card size is 8GB. Smaller cards can be used as well. Minimum size is 4GB. Windows machine can be used to prepare flash card. Download disk image with Raspbian (e.g. Stretch Lite from here

Unzip file to get image file 2018-04-18-raspbian-stretch-lite.img

Using Win32 Disk Imager write image to SD card. If any issue was faced then run program as administrator. If card access issue was faced then format SD card by using SD Card Formatter before writing image to a card. It can be downloaded from this web site.

IMPORTANT After writing image to SD card create empty file with name ssh and copy it to the root of the SD card. This will allow to login to Raspberry Pi using SSH.

Start player.

Insert SD card to Raspberry Pi. Switch power on. Wait until green LED (indicating CPU activity) on Raspberry Pi stops blinking.

Configure Raspbian

Connect through SSH using Putty (login as: pi password: raspberry).

Run the following command to re-synchronize Raspbian package index files:

sudo apt-get update 

Run command:

sudo raspi-config 

Select the following items in menu:

  • Change User Password. To improve the system security do change the default password. Use new password instead of the default one mentioned in this guide.
  • Boot Options
    • Desktop / CLI
      • Console Autologin To login to console with automatic login as pi user
  • Boot Options
    • Wait for Network at Boot. Wait until all required network libraries being loaded
  • Localization Options
    • Change Timezone. Change timezone according to your timezone. This is required for Peppy Player to show correct time in Clock screensaver.
  • Advanced Options
    • Expand Filesystem to utilize all available space on the flash card

Click Finish. If asked - Would you like to reboot now? select - Yes to reboot. Otherwise run command:

sudo reboot

Putty terminates the current session.

pi User Configuration

In order to run Peppy Player under pi user instead of sudo add pi user to the tty group:

sudo usermod -a -G tty pi

Also change access rights to tty device by changing udev rules:

sudo nano /lib/udev/rules.d/50-udev-default.rules

change line:

SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620"


SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"

Without these changes Pygame will crash with exception Unable to open console when started under pi user.

Pygame Configuration

Install Pygame library required by Peppy Player for GUI purposes:

sudo apt-get install python3-pygame

Pygame should be patched in order to make touchscreen usable. Create new script file in folder /home/pi:

chmod +x

Run the script:

sudo ./

Install pip3

This package management utility is required for installing different libraries for Python 3. To install pip3 run the following command:

sudo apt-get install python3-pip

VLC configuration

Install VLC media player:

sudo apt-get install vlc

Install VLC Python wrapper required for Peppy Player to communicate with VLC player:

pip3 install python-vlc

Configure HiFiBerry Amp2

Configure amplifier driver by adding new line to the file /boot/config.txt:

sudo nano /boot/config.txt

add the line to the end of file:


Comment out the following line to disable the default onboard audio system:



sudo reboot

Run alsamixer and set Analogue volume to 0 and Digital to 70.

git installation

This version control system is required to install Peppy Player code from GitHub. It can be installed by running the following command:

sudo apt-get install git

Peppy Player Installation

Install all required libraries which Peppy Player depends on:

sudo apt-get install eject
pip3 install tornado==4.5.3
pip3 install RPi.GPIO
pip3 install discogs_client
sudo apt-get install bluealsa
pip3 install pynanosvg
sudo apt-get install -y libasound2-plugin-equal
pip3 install oauth2
pip3 install feedparser

Install Peppy Player by running the following command from folder /home/pi:

git clone

To start Peppy Player during boot add the following lines to /etc/rc.local before exit 0:

sleep 10
su pi -c 'cd /home/pi/Peppy; openvt -s -- python3'

Equalizer Configuration

If you are not going to use Equalizer then it can be disabled in file /home/pi/Peppy/config.txt:

equalizer = False

If equalizer was disabled this section can be skipped.

To use equalizer create .asoundrc file in folder /home/pi with the following content:

pcm.!default {
  type plug
  slave.pcm plugequal;
ctl.!default {
  type hw card 0
ctl.equal {
  type equal;
pcm.plugequal {
  type equal;
  slave.pcm "plughw:0,0";
pcm.equal {
  type plug;
  slave.pcm plugequal;

Define equal device in file /home/pi/Peppy/players.txt:

server.command = --aout=alsa --alsa-audio-device=equal --verbose=-1

Peppyalsa Plugin Configuration

peppyalsa plugin should be installed in order to use VU Meter and Spectrum Analyzer screensavers. More detailed description about peppyalsa plugin can be found on its wiki pages. Here are the commands which will build the plugin and copy it to the folder /usr/local/lib:

cd /home/pi
git clone
cd peppyalsa
sudo apt-get install build-essential autoconf automake libtool libasound2-dev libfftw3-dev
aclocal && libtoolize
autoconf && automake --add-missing
./configure && make
sudo make install

Get the ALSA configuration file which supports peppyalsa plugin:

mv .asoundrc-peppyalsa /home/pi/.asoundrc

If you use both plugins: equalizer and peppyalsa then get the file which supports two plugins:

mv .asoundrc-equal-peppyalsa /home/pi/.asoundrc

Finally define default as output device in the configuration file /home/pi/Peppy/players.txt:

server.command = --aout=alsa --alsa-audio-device=default --verbose=-1

Adafruit 3.5" LCD Configuration

Download and run Adafruit LCD driver installation script:

chmod +x
sudo ./

In displayed menu select the following options:

Select configuration:
PiTFT 3.5" resistive touch (320x480)
Select rotation:
270 degrees (landscape)


sudo reboot

Splash Screen Configuration

Install program which will display splash image during booting:

sudo apt-get install fbi

Download service file for splash screen:


Move that file to the services folder:

sudo mv splash.service  /etc/systemd/system

Enable and start Splash Screen service:

sudo systemctl enable splash
sudo systemctl start splash

Configure LIRC and Pylirc (required only if you will use IR Remote Control)

Install LIRC - the library which handles IR remote controls:

sudo apt-get install lirc

After LIRC installation new folder will be created with the following content:

pi@raspberrypi:~ $ ls /etc/lirc
irexec.lircrc       lircd.conf    lircd.conf.dist  lircmd.conf.dist   lirc_options.conf.dist
irexec.lircrc.dist  lircd.conf.d  lircmd.conf      lirc_options.conf

Three IR Remote Control configuration files should be created. You can use provided files for WD TV Live as an example.

First you need to create file with extension conf. This file is specific for each IR Remote Control type. The file should be placed in folder /etc/lirc/lircd.conf.d. Here is the example content of that file for WD TV Live remote control.

This web site can be used for downloading this file for specific remote control type.

The second file lircrc is required for Peppy Player to handle remote control events. You can download the file this way:

sudo mv lircrc /etc/lirc

The third file can be downloaded the same way:

sudo mv hardware.conf /etc/lirc

Modify file /etc/lirc/lirc_options.conf by setting the following values:

driver = default
device = /dev/lirc0

Find the following line in file /boot/config.txt:


And change it to the following line assuming that IR sensor connected to GPIO pin #23:


Install Pylirc dependencies:

sudo apt-get install python3-dev
sudo apt-get install liblircclient-dev

Install Pylirc:

tar xvf pylirc2-0.1.tar.gz
cd pylirc2-0.1

Replace file pylircmodule.c:

rm pylircmodule.c

Install Pylirc:

sudo python3 install
sudo mv /usr/local/lib/python3.5/dist-packages/ /usr/local/lib/python3.5/dist-packages/

Rotary Encoders Configuration

To enable Rotary Encoders set parameter use.rotary.encoders in file /home/pi/Peppy/config.txt to True.

Congratulations! At this point you should have running Peppy player.

<<Previous | Next>>

Clone this wiki locally
You can’t perform that action at this time.