Waveshare 3.5 HDMI - project-owner/PeppyPlayers.doc GitHub Wiki
Overview
Here is the display description on the Waveshare web site. The display is available on Amazon.
Disk Image Content
This disk image is based on the Headless Disk Image and has the following additional software and configuration:
- libts-bin library for touchscreen calibration.
- Peppy Player was configured to work with GUI displayed in Waveshare LCD, Peppy Player splash screen was configured.
Installation and Configuration
Here are the steps to create the Disk Image for the Waveshare 3.5" HDMI touchscreen.
Install the Headless Disk Image
- Connect a display to the GPIO and HDMI 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.
Configure Peppy Player for display
Edit the player configuration file: nano Peppy/configuration/config.txt
Set parameters:
width = 720
height = 480
hdmi = True
headless = False
Copy changed file to the defaults:
cp Peppy/configuration/config.txt Peppy/configuration/defaults/
Configure HDMI display
Edit a system configuration file: sudo nano /boot/firmware/cmdline.txt
Add the display configuration at the beginning of the line:
video=HDMI-A-1:720x480@60
To disable boot messages during startup add the following text at the end of the line:
fbcon=map:2
Configure the touchscreen functionality
Edit a system configuration file: sudo nano /boot/firmware/config.txt
[all]
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
disable_splash=1
Create the rules file: sudo nano /etc/udev/rules.d/95-ads7846.rules Add the line:
SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{name}=="ADS7846 Touchscreen", SYMLINK+="input/touchscreen"
Disable the player to release the display for calibration program:
sudo systemctl disable peppy
Power off/on the system. Install touchscreen library:
sudo apt-get install libts-bin
Calibrate the touchscreen:
sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate
Enable the player:
sudo systemctl enable peppy
Install the Splash Screen
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=fbi -d /dev/fb0 --noverbose /home/pi/Peppy/splash/splash-720.png
Start splash service
sudo mv splash.service /etc/systemd/system
sudo systemctl enable splash
sudo systemctl start splash
Cleanup
rm -rf .wget-hsts .bash_history
touch .bash_history
history -c