3.5inch RPi LCD (B) 手动配置

来自Waveshare Wiki
跳转至: 导航搜索

对于Bullseye 64位系统,需要手动配置,方法如下:

安装烧写镜像

请在树莓派官网下载bullseye版本的镜像64bit。

1) 将镜像文件下载到电脑上,并解压得到.img文件。

2) 将TF卡连接到电脑,打开Win32DiskImager.exe软件,选择第1步准备的.img文件,点击write烧写镜像。烧写完成后,打开TF卡所在文件夹。

3) 将waveshare35b-v2.dtbo设备树文件下载解压添加至/boot/overlay文件夹

4) 将TF卡接入到树莓派上,启动树莓派,登录树莓派的终端(可以将树莓派接到HDMI显示器或用ssh远程登录)。

配置驱动文件

打开boot目录下的config.txt文件,注释掉dtoverlay=vc4-kms-v3d,并在[all]末尾添加

dtparam=spi=on
dtoverlay=waveshare35b-v2

hdmi_force_hotplug=1
max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 480 320 60 6 0 0 0
hdmi_drive=2
display_rotate=0

配置触摸

在终端运行以下语句:

sudo apt-get install xserver-xorg-input-evdev 
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
sudo apt-get install xinput-calibrator
sudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf

在99-calibration.conf文件中增加以下语句:

Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "ADS7846 Touchscreen"
        Option  "Calibration"   "3932 300 294 3801"
        Option  "SwapAxes"      "1"
        Option "EmulateThirdButton" "1"
        Option "EmulateThirdButtonTimeout" "1000"
        Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

运行FBCP移植

此过程需要联网

sudo apt-get install cmake
wget https://www.waveshare.net/w/upload/6/66/Rpi-fbcp.zip
unzip Rpi-fbcp.zip
cd rpi-fbcp/
mkdir build
cd build/
cmake ..
make
sudo install fbcp /usr/local/bin/fbcp

设置开机自启动

sudo nano /etc/rc.local

在末尾exit 0前添加以下语句:

sleep 7
fbcp &

3.5A 1.png

sudo reboot 重启后屏幕即可正常显示