Blog
Connect Raspberry Pi with LCD Display
Topway TFT LCD display connects with Raspberry Pi 3B+, to form a small system with touch and connect to Internet through WiFi.
- Hardware: 7" TFT LCD display LMT070DICFWD-NFA, Raspberry Pi 3B+
- System: Raspbian GNU
- Memory card: 16GB SD card
Connect Hardware
Connect Raspberry Pi and TFT display module as diagram below.
- Connect LMT070DICFWD-NFA with Raspberry with HDMI cable
- Use USB cable, connect Raspberry Pi to LCD display's RTP (resistive touch panel)
- Hook up 5V and 12V power supplies with Raspberry Pi & LMT070DICFWD-NFA separately
Install Operation System
- Download Raspbian from Raspberry web site, https://www.raspberrypi.org
- Format SD card, use Win32DiskImager write Raspbian system image to SD card
- Insert SD card into Raspberry Pi card slot, turn on the device and install OS by following on-screen instructions
Setup Screen Resolution
Update Raspberry Pi configuration file with the best resolution 800x480.
Edit config.txt under Windows or use Raspbian's edit command, add following lines.
?? disable_overscan=1
?? overscan_left=16
?? overscan_right=16
?? overscan_top=16
?? overscan_down=16
?? framebuffer_width=800
?? framebuffer_height=480
?? hdmi_group=2
?? hdmi_mode=87
?? hdmi_cvt=800 480 60 6 0 0 0
Setup Network
Connect Raspberry Pi to Internet, through WiFi
Install Touch Panel Driver
- Download and install pmLinux-Raspbian_v4_5_8_R1_(Jessie)_20180131
- Run PenMount Utility to calibrate touch screen
Install On-Screen Keyboard
Install SDK
?? sudo apt-get install libfakekey-dev libpng-dev libxft-dev autoconf libtool -y
Compile & Install matchbox-keyboard
?? git clone https://github.com/mwilliams03/matchbox-keyboard.git cd matchbox-keyboard ./autogen.sh
?? make
?? sudo make install
Install matchbox database
?? sudo apt-get install libmatchbox1 -y
Create a new document
?? sudo nano /usr/bin/toggle-matchbox-keyboard.sh
????? #!/bin/bash
????? #This script toggle the virtual keyboard
????? PID=`pidof matchbox-keyboard`
????? if [ ! -e $PID ]; then
? ? ? ? killall matchbox-keyboard
???? else
? ? ?? matchbox-keyboard&
???? fi
Set proper execution permission
?? sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh
Add an item in Start menu
?? sudo nano /usr/share/applications/toggle-matchbox-keyboard.desktop
?? [Desktop Entry]
?? Name=Toggle Matchbox Keyboard
?? Comment=Toggle Matchbox Keyboard
?? Exec=toggle-matchbox-keyboard.sh
?? Type=Application
?? Icon=matchbox-keyboard.png
?? Categories=Panel;Utility;MB
?? X-MB-INPUT-MECHANSIM=True
Create an icon on task bar, open up LXDE setting
?? nano ~/.config/lxpanel/LXDE-pi/panels/panel
???? Plugin {
? ? ? ? type = launchbar
? ?? ? Config {
??? ? ? ? Button { id=toggle-matchbox-keyboard.desktop }
? ?? ???? Button { id=lxde-screenlock.desktop }
? ?? ???? Button { id=lxde-logout.desktop }
? ? ? ? }
???? }
Bring up keyboard with this command: matchbox-keyboard
Adjust keyboard size with? -s option: matchbox-keyboard -s 50 extended