Difference between revisions of "5 Inch LCD Touch Screen Monitor for Raspberry Pi"

From Wiki
Jump to: navigation, search
Line 1: Line 1:
 
==Intrduction==
 
==Intrduction==
 +
 
[[File:inch1.jpg]]<br>
 
[[File:inch1.jpg]]<br>
This monitor is specially designed for Raspberry Pi. You're recommended to download and install the image we provide. It is written based on the Raspbian Jessie 2016-9-23 version and we've pre-installed the driver and pre-set the calibration program. So you can just burn it on your card for use. If you want to change the calibration, you can just find the program and alter it. <br>
+
 
Download the image at the bottom of the page, unzip the package downloaded and you'll see a .img file. Burn it to your TF card by win32imager.<br>
+
Designed for Raspberry Pi, the 5 inch HDMI display screen monitor holds a resistive touch screen with a resolution of 800x480. It supports back-light control with a button on the backside to control. With the HDMI interface, it doesn’t occupy any I/O port of Raspberry Pi. This touch screen monitor supports touch screen control and 800 x480 resolution, providing a perfect visual experience for you.<br>
Next, connect the monitor to the Raspberry Pi, and the HDMI board. plug in the TF card with the image file burnt. Connect the power and you can start the use.
+
Or, you may install the driver based on the instructions we provide in the package. <br>
+
  
 
If you have any problem, please feel free to contact us, by email to service@sunfounder.com or posts on our FORUM. We'll reply you ASAP. Thanks for support!<br>
 
If you have any problem, please feel free to contact us, by email to service@sunfounder.com or posts on our FORUM. We'll reply you ASAP. Thanks for support!<br>
<font color="red">Note:</font><br>
+
 
1) If you're doing this on an HDMI display, you're suggested to plug in the 5inch display into the Raspberry Pi. After the driver is installed and the Raspberry Pi is rebooted, you can see the 5'' screen shows the desktop of the Raspberry Pi, while the HDMI displays the CLI (command line interface).<br>
+
  
 
==Pin Description==
 
==Pin Description==
 +
 
[[File:5inch.png]]
 
[[File:5inch.png]]
==Application==
 
  
This 5 Inch LCD touch screen monitor can be applied to Raspberry Pi 1 model B and B+, 2 model B and 3 model B.
 
  
==Operation Procedures==
+
==Features==
  
[[File:inch5.jpg]]
+
* 硬件分辨率为800×480
 +
* 电阻式触摸控制
 +
* 兼容并可直接插入任何版本树莓派(树莓派Zero / Zero 2 W需另配HDMI连接线)
 +
* 支持Raspberry Pi OS / Ubuntu / Kali和Retropie系统
 +
* 可作为计算机显示器,无触摸功能(接入计算机须另配HDMI线)
 +
* 仅用于显示,不占用任何I/O资源(使用触摸功能,占用I/O)
 +
* 支持背光控制,更省电
  
'''Download''' the simplified installation package below (or [https://s3.amazonaws.com/sunfounder/Raspberry/images/LCD-show.tar.gz here]). Transfer it to the Raspberry Pi.
 
  
Finish the installation with Installation Guide which comes along with the product.
+
==硬件连接==
  
==Touch Screen Calibration==
+
将树莓派插入到显示屏上,把HDMI桥接板接入屏幕和主板的HDMI接口,并把LCD背后的Backlight拨到“ON”。
  
1.If there's any deviations of the touch screen, you need to calibrate it. On the touch screen, use a mouse, to click '''Menu''' -> '''Preference''' -> '''Calibrate Touchscreen'''. 
+
    [[File:inch5.jpg]]
  
[[File:inch2.jpg]]
 
  
2.Then the screen will show 4 points. You need to tap them one by one to calibrate.
+
注:树莓派Zero / Zero 2 W需另配HDMI连接线进行连接。
  
[[File:inch3.jpg]]
+
==软件设置==
  
3.After calibration, you will get the following. Copy the contents in the red box. 
+
An operating system needs to be installed onto the Micro SD card before inserting it into the Raspberry Pi.
  
[[File:inch4.jpg]]
+
<font color="red">Note:</font><br>
  
4.In the terminal, type in
+
Skip this chapter if the Raspberry Pi already has an operating system installed.
  
sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
 
Paste what you have copied just now to the file
 
  
Press '''Ctrl + X''', select''' Y''', and then press '''Enter''' to save the file
+
Raspberry Pi Imager is a quick and easy way to install the Raspberry Pi operating system to a Micro SD card from a computer or laptop.
  
5.In the terminal, type in
+
Browse to the Raspberry Pi Imager site and download the version that matches the computer or laptop\'s  operating system (www.raspberrypi.org/software). When the download is complete, launch the installer program and follow the prompts to install the Raspberry Pi Imager.
sudo reboot
+
After rebooting, the calibration will be done. 
+
  
==Driver Installation==
 
  
1.Click [https://s3.amazonaws.com/sunfounder/Raspberry/images/LCD-show.tar.gz here]to download LCD-show file.<br>
+
[[File:3d1.png]]
  
2.Please copy the LCD-show file to your Raspberry Pi,then run the following commands on the terminal:<br>
+
If the Windows operating system prevents the application from launching, click on '''More info''' and then click on '''Run anyway''' to install the Raspberry Pi Imager.
 +
 
 +
[[File:3d2.png]]
 +
 
 +
Insert the Micro SD card into the computer or laptop's SD card slot. If the computer or laptop only has a full-size port for SD cards, use a Micro SD card adapter.
 +
In the Raspberry Pi Imager, click '''CHOOSE OS''' -> '''Raspberry Pi OS'''.
 +
 
 +
[[File:3d3.png]]
 +
 
 +
 
 +
Select the SD card you are using.
 +
 
 +
[[File:3d4.png]]
 +
 
 +
Click the **WRITE** button.
 +
 
 +
[[File:3d5.png]]
 +
 
 +
烧写完成后,打开TF卡根目录的config.txt文件,在config.txt最后加入以下代码,保存并安全弹出TF卡。
  
 
<pre>
 
<pre>
tar xzvf LCD-show.tar.gz
+
hdmi_group=2
 +
hdmi_mode=87
 +
hdmi_cvt 800 480 60 6 0 0 0
 +
hdmi_drive=1
 +
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
 
</pre>
 
</pre>
  
3.Run the following commands on the terminal to go into the folder and install:<br>
+
将TF卡插入树莓派,给树莓派上电,正常等待十几秒后可正常显示。但此时触摸的是有问题的,需要对触摸进行校准。
 +
 
 +
 
 +
==触摸校准==
 +
 
 +
该显示屏可以通过xinput-calibrator进行校准。
 +
 
 +
执行以下命令,安装相关软件:
  
 
<pre>
 
<pre>
cd LCD-show/
+
sudo apt-get install xserver-xorg-input-evdev xinput-calibrator
chmod + x LCD5-show
+
./LCD5-show
+
 
</pre>
 
</pre>
  
==Attention==
+
如果执行失败可以查看这里能遇到的问题
<font color="red">Warning:</font>sometimes the driver installation may fail to be completed, and will further cause data missing, so you will need to reburn the system. You should clear about the risk.<br>
+
<font color="green">Suggestion:</font>Copy the important information on SD card to another one before driver installation.<br>
+
<font color="blue">Here is how:</font>Connect the Raspberry Pi to the display, click '''menu -> Accessories -> SD Card Copier''', and select the proper device to start.<br>
+
[[File:SD-1.png]]<br>
+
[[File:SD-2.png]]<br>
+
  
=='''Resource'''==
+
执行以下命令:
[https://s3.amazonaws.com/sunfounder/Raspberry/images/5LCD-Show/5.0-inch-LCD-2016-09-23-raspbian-jessie.zip 5.0-inch-LCD-2016-09-23-raspbian-jessie] [[File:ZIP.jpg]]<br>
+
  
[https://s3.amazonaws.com/sunfounder/Raspberry/images/LCD-show.tar.gz LCD-show][[File:ZIP.jpg]]
+
<pre>
 +
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
 +
sudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf
 +
</pre>
 +
 
 +
在99-calibration.conf添加下以代码:
 +
 
 +
<pre>
 +
Section "InputClass"
 +
        Identifier      "calibration"
 +
        MatchProduct    "ADS7846 Touchscreen"
 +
        Option  "Calibration"  "208 3905 288 3910"
 +
        Option  "SwapAxes"      "0"
 +
        Option "EmulateThirdButton" "1"
 +
        Option "EmulateThirdButtonTimeout" "1000"
 +
        Option "EmulateThirdButtonMoveThreshold" "300"
 +
EndSection
 +
</pre>
 +
 
 +
重启树莓派
 +
 
 +
On the touch screen, use a mouse, to click '''Menu''' -> '''Preference''' -> '''Calibrate Touchscreen'''. 
 +
 
 +
[[File:inch2.jpg]]
 +
 
 +
Then the screen will show 4 points. You need to tap them one by one to calibrate.
 +
 
 +
[[File:inch3.jpg]]
 +
 
 +
After calibration, you will get the following. Copy the contents in the red box. 
 +
 
 +
[[File:inch4.jpg]]
 +
 
 +
In the terminal, type in
 +
 
 +
<pre>
 +
sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
 +
</pre>
 +
 
 +
Paste what you have copied just now to the file
 +
 
 +
Press '''Ctrl + X''', select''' Y''', and then press '''Enter''' to save the file。
 +
 
 +
5.In the terminal, type in
 +
 
 +
<pre>
 +
sudo reboot
 +
</pre>
 +
 
 +
After rebooting, the calibration will be done. 

Revision as of 03:15, 28 July 2022

Intrduction

Inch1.jpg

Designed for Raspberry Pi, the 5 inch HDMI display screen monitor holds a resistive touch screen with a resolution of 800x480. It supports back-light control with a button on the backside to control. With the HDMI interface, it doesn’t occupy any I/O port of Raspberry Pi. This touch screen monitor supports touch screen control and 800 x480 resolution, providing a perfect visual experience for you.

If you have any problem, please feel free to contact us, by email to service@sunfounder.com or posts on our FORUM. We'll reply you ASAP. Thanks for support!


Pin Description

5inch.png


Features

  • 硬件分辨率为800×480
  • 电阻式触摸控制
  • 兼容并可直接插入任何版本树莓派(树莓派Zero / Zero 2 W需另配HDMI连接线)
  • 支持Raspberry Pi OS / Ubuntu / Kali和Retropie系统
  • 可作为计算机显示器,无触摸功能(接入计算机须另配HDMI线)
  • 仅用于显示,不占用任何I/O资源(使用触摸功能,占用I/O)
  • 支持背光控制,更省电


硬件连接

将树莓派插入到显示屏上,把HDMI桥接板接入屏幕和主板的HDMI接口,并把LCD背后的Backlight拨到“ON”。

   Inch5.jpg


注:树莓派Zero / Zero 2 W需另配HDMI连接线进行连接。

软件设置

An operating system needs to be installed onto the Micro SD card before inserting it into the Raspberry Pi.

Note:

Skip this chapter if the Raspberry Pi already has an operating system installed.


Raspberry Pi Imager is a quick and easy way to install the Raspberry Pi operating system to a Micro SD card from a computer or laptop.

Browse to the Raspberry Pi Imager site and download the version that matches the computer or laptop\'s operating system (www.raspberrypi.org/software). When the download is complete, launch the installer program and follow the prompts to install the Raspberry Pi Imager.


3d1.png

If the Windows operating system prevents the application from launching, click on More info and then click on Run anyway to install the Raspberry Pi Imager.

3d2.png

Insert the Micro SD card into the computer or laptop's SD card slot. If the computer or laptop only has a full-size port for SD cards, use a Micro SD card adapter. In the Raspberry Pi Imager, click CHOOSE OS -> Raspberry Pi OS.

3d3.png


Select the SD card you are using.

3d4.png

Click the **WRITE** button.

3d5.png

烧写完成后,打开TF卡根目录的config.txt文件,在config.txt最后加入以下代码,保存并安全弹出TF卡。

hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
hdmi_drive=1
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900

将TF卡插入树莓派,给树莓派上电,正常等待十几秒后可正常显示。但此时触摸的是有问题的,需要对触摸进行校准。


触摸校准

该显示屏可以通过xinput-calibrator进行校准。

执行以下命令,安装相关软件:

sudo apt-get install xserver-xorg-input-evdev xinput-calibrator

如果执行失败可以查看这里能遇到的问题

执行以下命令:

sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
sudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf

在99-calibration.conf添加下以代码:

Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "ADS7846 Touchscreen"
        Option  "Calibration"   "208 3905 288 3910"
        Option  "SwapAxes"      "0"
        Option "EmulateThirdButton" "1"
        Option "EmulateThirdButtonTimeout" "1000"
        Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

重启树莓派

On the touch screen, use a mouse, to click Menu -> Preference -> Calibrate Touchscreen

Inch2.jpg

Then the screen will show 4 points. You need to tap them one by one to calibrate.

Inch3.jpg

After calibration, you will get the following. Copy the contents in the red box. 

Inch4.jpg

In the terminal, type in

sudo nano /etc/X11/xorg.conf.d/99-calibration.conf

Paste what you have copied just now to the file

Press Ctrl + X, select Y, and then press Enter to save the file。

5.In the terminal, type in

sudo reboot

After rebooting, the calibration will be done.