Waveshare 7.9 - project-owner/PeppyPlayers.doc GitHub Wiki
Here is the display description on the Waveshare web site. The display is available on Amazon.
This disk image is based on the Headless Disk Image and has the following additional software and configuration:
- Screen was rotated (display_rotate=3 in /boot/config.txt).
- Rainbow splash disabled (disable_splash=1 in /boot/config.txt)
- Peppy Player was configured to work with GUI displayed in LCD, Peppy Player splash screen was configured.
Here are the steps which were used to create the Disk Image for the Waveshare 7.9" touchscreen.
- Connect display using HDMI and USB connectors.
- Download the Headless Disk Image
- Write downloaded disk image to 8GB MicroSD card.
- Insert a MicroSD card to a Raspberry Pi, power on, login using putty.
Edit the player configuration file
nano Peppy/config.txt
Set parameters:
width = 1280
height = 400
hdmi = True
headless = False
Copy changed file to the defaults:
cp Peppy/config.txt Peppy/defaults/
Edit Spectrum Analyzer screensaver configuration:
nano Peppy/screensaver/spectrum/config.txt
Set property:
screen.size = wide
Edit VU Meter screensaver configuration:
nano Peppy/screensaver/peppymeter/config.txt
Set property:
meter.size = wide
This change will enable the wide type of the VU Meter screensaver:
Edit the system configuration file:
sudo nano /boot/config.txt
Set the parameters:
max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_timings=400 0 100 10 140 1280 10 20 20 2 0 0 0 60 0 43000000 3
display_rotate=3
disable_splash=1
Comment out the line (required for Raspberry Pi 4, works with Pi 3 too):
#dtoverlay=vc4-fkms-v3d
Install library for PIL:
sudo apt-get install libopenjp2-7-dev
Install touchscreen library:
sudo apt-get install libts-bin
sudo reboot
Calibrate touchscreen:
sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 ts_calibrate
sudo apt-get install fbi
wget https://raw.githubusercontent.com/project-owner/Peppy.doc/master/files/splash.service
Edit the service file:
nano splash.service
change the line to:
ExecStart=/usr/bin/fbi -d /dev/fb0 --noverbose -a /home/pi/Peppy/splash/splash-1280.png
Start service:
sudo mv splash.service /etc/systemd/system
sudo systemctl enable splash
sudo systemctl start splash
To switch from HDMI to the on-board audio run:
sudo raspi-config
Select System Options/Audio/Headphones.
Change the audio card number from 0 (HDMI) to 1 (Headphones):
nano .asoundrc-equal-peppyalsa
Change the properties:
type hw card 0
...
slave.pcm "plughw:0,0"
to
type hw card 1
...
slave.pcm "plughw:1,0"
Switch to edited file and test audio:
cp .asoundrc-equal-peppyalsa .asoundrc
speaker-test -t wav
Edit the configuration file:
sudo nano /boot/cmdline.txt
Add parameter
fbcon=map:2
Enable the player:
sudo nano /etc/rc.local
remove comment at line:
su pi -c 'cd /home/pi/Peppy; openvt -s -- python3 peppy.py'
sudo reboot
Test player functionality.
Cleanup:
rm -rf .wget_hsts .bash_history
sudo poweroff