树莓派3B安装3.5寸spi触摸屏驱动

git上也有驱动的文件,可以使用git去下载,地址是:https://github.com/goodtft/LCD-show,或这个https://github.com/waveshare/LCD-show
可以使用:

  1. cd /boot

  2. sudo git clone https://github.com/goodtft/LCD-show.git

sudo git clone https://github.com/waveshare/LCD-show.git(建议执行这个)

 

通过git方法下载的

使用方法:
LCD/HDMI切换

cd /boot/LCD-show  执行sudo ./LCD35-show(这一句是第一次使用会执行安装驱动,并切换回spi触摸屏显示。)
cd /boot/LCD-show  执行sudo ./LCD-hdmi(这一句执行后重启,(如果是触摸屏显示的话)切换回从hdmi输出)

 

三、LCD和HDMI相互切换

使用方法的在正常使用LCD的情况下,外接HDMI是没有显示的,如需启用HDMI输出,需执行以下命令,树莓派会自动重启。再等待约30秒,HDMI显示屏开始显示。

cd LCD-show/

sudo ./LCD-hdmi

如需切换回LCD显示方式,则需执行以下命令:

cd LCD-show/

sudo ./LCD35-show

四、LCD修改屏幕旋转方向。

安装完触摸驱动后,可以通过运行以下命令修改屏幕旋转方向。

§  旋转0度:

1.  cd LCD-show/

2.  ./LCD35-show 0

§  旋转90度:

1.  cd LCD-show/

2.  ./LCD35-show 90

§  旋转180度:

1.  cd LCD-show/

2.  ./LCD35-show 180

§  旋转270度:

1.  cd LCD-show/

2.  ./LCD35-show 270

重启后一般就可以了,假如发现有问题,尝试下断电重启。

 

 

五、注意事项

⚠️注意1:执行apt-get upgrade会导致LCD无法正常工作。此时需要编辑SD卡中的 config.txt 文件,并删除这一句:

dtoverlay=ads7846

⚠️注意2:在Raspbian-lite系统下,需要执行sudo ./LCD35-show lite命令,以安装驱动。

⚠️注意3:也可以使用已经安装好驱动的树莓派镜像,下载链接:

 

  • 1
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
树莓派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
发出的红包

打赏作者

hu5566798

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值