自从Build #2101版本开始官方加入自己的nextion触摸屏版本,官方下载nextion tft文件如下:
https://www.nanodlp.com/download/nextion-tft.zip
nanodlp最新稳定官方版本下载如下:
https://www.nanodlp.com/nanodlp.img.gz
官方并没有告知如何使用nextion触摸屏:
方法如下:1.打开树莓派串口功能,2.让蓝牙不要占用GPIO 串口。即可可以使用官方的Nextion tft版本。
MANDATORY : Enable /dev/ttyAMA0 For Raspberry Pi Zero and Raspberry Pi 3
sudo raspi-config
=> Interfacing Option
=> Serial
=> NO
=> YES
sudo nano /boot/config.txt
=> add this line :
dtoverlay=pi3-miniuart-bt
將 Pi 3 Bluetooth 移到 mini-UART (ttyS0)
=> then
sudo reboot
sudo nano /boot/cmdline.txt
=> remove the word phase "console=serial0,115200" or "console=ttyAMA0,115200"
sudo reboot
设置Machine Settings 选择:Setup Mode--Advance
拉动到最后一项:Various Settings---Nextion Display Port Address
鼠标双击Nextion Display Port Address空白项,就会有ttyAMA0(硬件串口)和ttyS0(mini串口),肯定要选择ttyAMA0(硬件串口),点击提交。重启树莓派,nextion 既可以连接上树莓派,并可以控制。