Difference between revisions of "How to run two monitors on Raspberry Pi 4"
(Created page with "{{lan |cn=http://www.lcdwiki.com/zh/如何在树莓派4中使用双屏显示 |en=http://www.lcdwiki.com/如何在树莓派4中使用双屏显示 }} ==<font color="blue">一、...") |
(→一、电容触摸屏的设置方法) |
||
Line 3: | Line 3: | ||
|en=http://www.lcdwiki.com/如何在树莓派4中使用双屏显示 | |en=http://www.lcdwiki.com/如何在树莓派4中使用双屏显示 | ||
}} | }} | ||
− | ==<font color="blue"> | + | ==<font color="blue">Setting method of Capacitive touch screen</font>== |
− | + | The following is an example of '''7inch HDMI Display-C''' capacitive touch screen: <br/><br/> | |
− | 1. | + | 1.According to the tutorial [http://www.lcdwiki.com/res/PublicFile/How_to_use_Raspberry_Pi(Download,Format,Burn,SSH,PuTTy)-V1.0.pdf How_to_use_Raspberry_Pi(Download,Format,Burn,SSH,PuTTy)],Burn the latest official Raspbian system to the SD card, connect the 7inch HDMI Display-C to the first HDMI of the Pi4, and connect the computer monitor to the second HDMI |
<br/><br/> | <br/><br/> | ||
Revision as of 14:33, 4 November 2019
Setting method of Capacitive touch screen
The following is an example of 7inch HDMI Display-C capacitive touch screen:
1.According to the tutorial How_to_use_Raspberry_Pi(Download,Format,Burn,SSH,PuTTy),Burn the latest official Raspbian system to the SD card, connect the 7inch HDMI Display-C to the first HDMI of the Pi4, and connect the computer monitor to the second HDMI
2.插入SD卡,树莓派上电开机。这时就能看到两个显示屏都可以正常显示,但是显示的内容不一样,而且7inch HDMI Display-C的触摸会偏差很大。
原因是,两个显示屏现在是向右拓展显示状态。如果只当拓展显示屏来使用,这就足够了,但是如果想触摸功能也能使用,就要进行下一步的设置。
3.执行下面的命令,打开config.txt文件:
sudo nano /boot/config.txt
在最后面加入语句:
max_usb_current=1 hdmi_force_hotplug=1 config_hdmi_boost=7 hdmi_group=2 hdmi_mode=87 hdmi_drive=1 display_rotate=0 hdmi_cvt 1024 600 60 6 0 0 0 [hdmi:1] max_usb_current=1 hdmi_force_hotplug=1 config_hdmi_boost=7 hdmi_group=2 hdmi_mode=87 hdmi_drive=1 display_rotate=0 hdmi_cvt 1024 600 60 6 0 0 0
(其中的两个1024 600也可以同时改为1920 1080, 800 480等常用的分辨率)
按Ctrl+X键,退出;再按Y键,保存;然后按回车键,确认保存
4.执行下面的命令,系统会重新启动:
sudo reboot
5.重新启动之后,打开Screen Configuration:
6.拖动HDMI-2与HDMI-1重合,并点击绿色的钩确认:
7.两个显示屏就可以复制显示同一个画面,而且触摸能正常使用:
二、电阻触摸屏的设置方法
下面以电阻触摸屏5inch HDMI Display 为例子来说明:
1.按照教程 树莓派入门教程(下载,格式化,烧录,SSH,PuTTy),把Raspbian官方最新系统烧录到SD卡中,5inch HDMI Display连接到Pi4的第一个HDMI, 电脑显示器连接到第二个HDMI
2.插入SD卡,树莓派上电开机,并按照教程 如何安装LCD驱动(CN) 安装5inch HDMI Display驱动。安装完驱动之后,就能看到两个显示屏都可以正常显示,但是显示的内容不一样,而且5inch HDMI Display 的触摸会偏差很大。
3.执行下面的命令,打开config.txt文件:
sudo nano /boot/config.txt
在最后面加入语句:
[hdmi:1] max_usb_current=1 hdmi_force_hotplug=1 config_hdmi_boost=7 hdmi_group=2 hdmi_mode=87 hdmi_drive=1 hdmi_cvt 800 480 60 6 0 0 0
(其中的两个800 480也可以同时改为1920 1080, 1024 600等常用的分辨率)
按Ctrl+X键,退出;再按Y键,保存;然后按回车键,确认保存
4.执行下面的命令,系统会重新启动:
sudo reboot
后面的5,6,7步都和电容触摸屏的一样。
注意:
1. 在config.txt中的这两句是Pi4实现双屏显示的关键,一定要有。
dtoverlay=vc4-fkms-v3d max_framebuffers=2
2.如果想触摸要准确,只能是复制显示,HDMI1和HDMI2重叠,而且两个屏的分辨率一样。