树莓派3B+(0A):安装LCD驱动

本文介绍如何为树莓派的3.5寸LCD屏幕安装驱动,并提供了两种选择:微雪驱动和Github上的开源驱动。文章还详细描述了配置过程,包括如何切换LCD和HDMI显示及调整屏幕旋转。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装LCD驱动


一、安装驱动

整个安装过程中,树莓派要保证处于联网状态。可以使用微雪的驱动或者Github上的驱动,这两种驱动都可以成功驱动我的3.5寸屏。

1.使用微雪的驱动:

微雪驱动文件列表:

★ 2.8inch RPi LCD (A)
★ 3.2inch RPi LCD (B)
★ 3.5inch RPi LCD (A)
★ 3.5inch RPi LCD (B)
★ 3.5inch HDMI LCD
★ 4inch HDMI LCD
★ 4inch RPi LCD (A)
★ 4.3inch HDMI LCD
★ 5inch HDMI LCD
★ 5inch HDMI LCD (B)
★ 7inch HDMI LCD
★ 7inch HDMI LCD (B)
★ 7inch HDMI LCD (C)
★ 10.1inch HDMI LCD
★ 10.1inch HDMI LCD (H)
★ 10.1inch HDMI LCD (B)

找到对应自己显示屏的版本文件下载,我的显示屏是3.5英寸的,我所下载的驱动文件是:http://www.waveshare.net/w/upload/3/34/LCD-show-180331.tar.gz,下载好之后将文件放在TF卡boot目录下(一定要是boot目录下啊),ssh登录树莓派,root用户下执行如下命令:

cd /boot
tar -zxvf  LCD-show-180331.tar.gz
cd LCD-show/
chmod +x LCD35-show    # LCD35-show是可执行文件就不需要执行这条语句
./LCD35-show

2.使用Github上的驱动

项目地址:https://github.com/goodtft/LCD-show,提供3.2” 3.5” 5.0” 7.0”的驱动。
树莓派切换root用户,进入/boot目录下,执行如下命令:

git clone https://github.com/goodtft/LCD-show.git
chmod -R 755 LCD-show
cd LCD-show/
./LCD35-show

驱动安装完成后会自动重启,重启之后就OK了。
这里写图片描述

注意:这两款驱动在应用之后,都存在触摸屏xy轴颠倒的问题,系统提供的校准也不能修复这种情况。


二、LCD配置

root用户下进入/boot/LCD-show

1.LCD/HDMI切换

./LCD-hdmi           # HDMI显示
./LCD35-show         # LCD显示

2.屏幕旋转

./LCD35-show 0       # 旋转0度
./LCD35-show 90      # 旋转90度
./LCD35-show 180     # 旋转180度
./LCD35-show 270     # 旋转270度

参考文档:

树莓派LCD驱动/2.8/3.2/3.5/3.97/4.3/5/7等! You can focus on the following GitHub web site, for the latest lcd drivers: https://github.com/goodtft/LCD-show =============================================================================================================== "LCD-show-170315.tar.gz" just for Raspbian (Release date:2017-03-02) or later, DO NOT use it for the Raspbian version before 2017-03-02. ================================================================================================================ "LCD-show-160701.tar.gz" support Raspbian version before Raspbian-2017-02-16,such as(2017-02-16,2017-01-11, 2016-11-25,2016-09-23,2016-05-27,2016-05-10,2016-03-18,or earlier). And This Driver also tesed on "kali-2.1.2" ,"ubuntu-mate-16.04-beta2" ================================================================================================================ How to Install: 1.)Step1, Install Raspbian official mirror a)Download Raspbian official mirror: https://www.raspberrypi.org/downloads/ b)Use“SDFormatter.exe”to Format your TF Card c)Use“Win32DiskImager.exe” Burning mirror to TF Card 2.) Step2, Clone my repo onto your pi git clone https://github.com/goodtft/LCD-show.git chmod -R 755 LCD-show cd LCD-show/ 3.)Step3, According to your LCD's type, excute: In case of 2.8" LCD sudo ./LCD28-show In case of 3.2" LCD sudo ./LCD32-show In case of 3.5" LCD sudo ./LCD35-show In case of 3.97" LCD sudo ./LCD397-show In case of 4.3" LCD sudo ./LCD43-show In case of 5" LCD sudo ./LCD5-show In case of 7inch(B)-800X480 RPI LCD sudo ./LCD7B-show In case of 7inch(C)-1024X600 RPI LCD sudo ./LCD7C-show If you need to switch back to the traditional HDMI display sudo ./LCD-hdmi Wait a few minutes,the system will restart automaticall , enjoy with your LCD.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值