跳到主要内容

使用说明

对于Bullseye系统​

下载运行驱动​

打开树莓派终端,执行:

sudo apt-get install unzip -y
sudo apt-get install cmake -y
sudo wget https://www.waveshare.net/w/upload/1/1b/Zero_LCD_HAT_A_fbcp.zip
sudo unzip ./Zero_LCD_HAT_A_fbcp.zip
sudo cp Zero_LCD_HAT_A.dtbo /boot/overlays/
sudo wget https://www.waveshare.net/w/upload/6/66/Rpi-fbcp.zip
sudo unzip ./Rpi-fbcp.zip
cd rpi-fbcp/
sudo mkdir build
cd build
sudo cmake ..
sudo make -j8
sudo install fbcp /usr/local/bin/fbcp
sudo ./fbcp

编辑config.txt文件

sudo nano /boot/config.txt

屏蔽下图对应的语句

FBCP CLOSE

在config.txt最后加入以下代码

dtparam=spi=on
dtoverlay=spi1-1cs
dtoverlay=Zero_LCD_HAT_A

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

设置开机自启动​

sudo cp ~/rpi-fbcp/build/fbcp /usr/local/bin/fbcp
sudo nano /etc/rc.local

在 exit 0 前面添加如下代码。

sleep 2
fbcp &
  • 注意一定要添加"&" 后台运行,否则可能会出现系统不能启动的情况。

1in3 lcd fbcp sleep

随后需要进行重启

sudo reboot

重启后即可正常显示

对于Trixie和Bookworm系统​

注意

注意:以下操作必须基于Raspberry Pi OS Lite版本

可使用任意下列 Lite 系统镜像(根据需要选择 64 位或 32 位):

下载必要的软件​

  • 更新系统

    sudo apt update && sudo apt upgrade && sudo apt full-upgrade -y
  • 安装xorg服务

    sudo apt-get install --no-install-recommends xserver-xorg -y
    sudo apt-get install --no-install-recommends xinit -y
  • 安装桌面管理器

    sudo apt install lightdm -y
  • 安装树莓派官方GUI

    sudo apt install raspberrypi-ui-mods -y
  • 安装浏览器(可选)

    sudo apt install chromium-browser -y

下载运行驱动​

打开树莓派终端,执行:

sudo apt-get install unzip -y
sudo apt-get install cmake -y
sudo wget https://www.waveshare.net/w/upload/1/1b/Zero_LCD_HAT_A_fbcp.zip
sudo unzip ./Zero_LCD_HAT_A_fbcp.zip
sudo cp Zero_LCD_HAT_A.dtbo /boot/overlays/

编辑config.txt文件

sudo nano /boot/firmware/config.txt

屏蔽下图对应的语句

FBCP CLOSE

在config.txt最后加入以下代码

dtparam=spi=on
dtoverlay=spi1-1cs
dtoverlay=Zero_LCD_HAT_A
hdmi_force_hotplug=1
max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 320 320 60 6 0 0 0
hdmi_drive=2

设置开机自启动​

  • 打开.bash_profile文件,如果没有.bash_profile文件则自己创建一个

    sudo nano ~/.bash_profile

把以下代码加到.bash_profile文件最下面

export FRAMEBUFFER=/dev/fb1
startx 2> /tmp/xorg_errors

sudo reboot重启保存

设置CLI自动登录​

sudo raspi-config nonint do_boot_behaviour B2
sudo raspi-config nonint do_wayland W1
sudo reboot

重启后主屏幕即可正常显示。
Note1:确保树莓派的用户名为pi否则无法正常自动登录
Note2:设置上述所有配置后,系统每次重启期间都会变久一点,SSH也需要等待一会儿才能进入;