Test3

From Waveshare Wiki
Revision as of 03:10, 13 March 2024 by Waveshare-admin (talk | contribs)
Jump to: navigation, search

Software Setting

Method 2: Program Pre-install Image

1. Click to download Waveshare DSI LCD - Pi4 pre-install image and unzip it to get ".img" file.
2. Connect the TF card to the PC and use SDFormatter to format the TF card.
3. Open Win32DiskImager software, choose the system image prepared in the first step, and then click "write" to write the system image,
4. After programming, open the "config.txt" file in the root directory of the TF card, add the following code at the end of config.txt, save and then safely remove the TF card.

dtoverlay=WS_xinchDSI_Screen,SCREEN_type=5,I2C_bus=10
dtoverlay=WS_xinchDSI_Touch,invertedx,invertedy,I2C_bus=10

5. Connect the TF card to the Raspberry Pi, and start the Raspberry Pi, wait for about 30 seconds to display and touch normally.

Rotation

Method 1: Graphical Interface Rotation

In the start menu, select: Preferences -> Screen Configuration -> Configure -> Screens -> DSI-1 -> Orientation, select the corresponding angle in it, click "√", select Yes, and restart.
4inch-DSI-LCD-Manual-02.jpg

Method 2: Rotation Display In Lite Version

sudo nano /boot/cmdline.txt
#Add a command corresponding to the display rotation angle at the beginning of the cmdline.txt file, save it and restart it to take effect
#display rotated 90 degrees
video=DSI-1:400x1280M@60,rotate=90
#display rotated 180 degrees
video=DSI-1:400x1280M@60,rotate=180
#display rotated 270 degrees
video=DSI-1:400x1280M@60,rotate=270

2.8inch DSI LCD05582.png

Touch To Rotate

sudo nano /boot/config.txt
#Modify the instruction of the touch rotation angle at the end of the config.txt file, and it will take effect after restarting (there is a 0° touch direction instruction by default)
#90°:
dtoverlay=WS_xinchDSI_Touch,invertedy,swappedxy
#180°:
dtoverlay=WS_xinchDSI_Touch
#270°:
dtoverlay=WS_xinchDSI_Touch,invertedx,swappedxy
#0°:
dtoverlay=WS_xinchDSI_Touch,invertedx,invertedy

Disable Touch

At the end of the config.txt file, add the following commands corresponding to disabling touch (the config file is located in the root directory of the TF card, and can also be accessed through the command: sudo nano /boot/config.txt):

disable_touchscreen=1

Note: After adding the command, it needs to be restarted to take effect.

Precaution

1. Update the system, such as executing the following command:

sudo apt-get update
sudo apt-get full-upgrade

After updating the system, some files of the originally installed driver may be overwritten, and the driver needs to be reinstalled to display normally.
2. Replace the motherboard
If the driver is originally installed on the Raspberry Pi 4 Model B, the user replaces the motherboard, such as modifying it to a Raspberry Pi 3 Model B+, the display will not display properly.
Because Pi4 and Pi3 need to load different driver files, you need to reinstall the driver on the new motherboard to display properly.