This video show how to setup 4" HDMI Display-C (XPT2046 Touch Controller/800x480 Pixel) on Raspberry Pi 4B/8G (Raspberry Pi OS 32 bit).
Visit http://www.lcdwiki.com/4inch_HDMI_Display-C, follow the steps, enter the command in Terminal:
Install the Display/Touch driver:
$ sudo rm -rf LCD-show
$ git clone https://github.com/goodtft/LCD-show.git
$ chmod -R 755 LCD-show
$ cd LCD-show/
$ sudo ./MPI4008-show
Calibrate the touch screen of 4 inch 800x480 HDMI Display for Raspberry Pi
Actually, the touch is calibrated very well after driver installed.
To calibrate the touch screen:
download How_to_calibrate_the_resistance_touch_screen-V1.2 below
Download Resources,
follow the steps.
With driver installed,
Enter the commands in Terminal:
$ cd LCD-show/
$ sudo dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb
Execute the touch calibration command:
$ DISPLAY=:0.0 xinput_calibrator
Touch the four calibration points with the touch pen
New touch parameters will be displayed after calibration
Edit /etc/X11/xorg.conf.d/99-calibration.conf,
update with new touch parameters.
$ sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
Save and exit:
- Ctrl-X
- Y
- Enter
$ sudo reboot
Next:
~ Install Virtual Keyboard(matchbox-keyboard) on Raspberry Pi
Remark@2021-07-15:
By default without installing driver, the screen will display in vertical
(portrait). With Raspberry Pi OS Screen Configuration Orientation feature, I can
change screen direction.
For sure, without installing driver, it cannot detect touch. Normally I use
wireless keyboard with mouse pad, so no need touch function.
No comments:
Post a Comment