1.资料来自http://www.waveshare.net/wiki/3.5inch_RPi_LCD_(A)
2.下载驱动:http://www.waveshare.net/w/upload/9/9d/LCD-show-151020.tar.gz
http://www.waveshare.net/w/upload/7/74/LCD-show-170309.tar.gz 树莓派LCD驱动:170309,适用于2017-03-02-raspbian-jessie及之后版本的Raspbian(注:该驱动安装时,必须联网)
#tar xvf LCD-show******.tar.gz
#cd LCD-show/
#sudo ./LCD35-show
等待几分钟,系统自动重启,即可正常使用树莓派LCD
如果想切换为HDMI显示,只需运行命令:
#sudo ./LCD-hdmi
更新需按照以下方式进行,否则可能导致镜像无法运行:
#sudo apt-mark hold raspberrypi-bootloader
#sudo apt-get update
#sudo apt-get upgrade
注意:执行apt-get upgrade会导致LCD无法正常工作。此时需要编辑SD卡中的 config.txt 文件,并删除这一句:dtoverlay=ads7846。
触摸屏校正:
1) 执行以下命令
#su pi
#DISPLAY=:0.0 xinput_calibrator
2) 运行该命令后,LCD 屏上提示 4 点校准。分别点击各点完成校准。终端输出一组数据:
Doing dynamic recalibration:
Setting new calibration data: 126, 3734, 3892, 199
记下这组数据。
3) 执行以下命令,编辑 99-calibration.conf:
sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
出现一组数据:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "MinX" "62189"
Option "MaxX" "2116"
Option "MinY" "3846"
Option "MaxY" "61552"
Option "SwapXY" "1" # unless it was already set to 1
EndSection
4) 将 Option “Calibration”之后的一串数字改为之前记下的数字,粘贴数字时候要保留””,即改
为:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "MinX" "62189"
Option "MaxX" "2116"
Option "MinY" "3846"
Option "MaxY" "61552"
Option "SwapXY" "1" # unless it was already set to 1
EndSection
5) 按下 Ctrl+X 选择 Y 保存退出。
6) 重启系统之后即可使用:
sudo reboot
注意:如果存在触摸不准的情况,则再次进行校准并且重启系统。
软键盘:
#sudo apt-get update
#sudo apt-get upgrade
#sudo apt-get install matchbox-keyboard