Difference between revisions of "Test3"

From Waveshare Wiki
Jump to: navigation, search
(Replaced content with "name -a")
Tag: Replaced
Line 1: Line 1:
==Software Setting==
+
name -a
===Method 1: Install Manually===
 
#Download the image of the newest version [https://www.raspberrypi.org/software/operating-systems/ Raspberry Pi], download the compressed file to the PC, and extract the .img file.<br/>
 
#Connect TF card to PC, use [https://files.waveshare.com/upload/d/d7/Panasonic_SDFormatter.zip SDFormatter] to format TF card.<br/>
 
#Open [https://files.waveshare.com/upload/7/76/Win32DiskImager.zip Win32DiskImager] software, select the system image prepared in step 1 and click write to burn the system image.<br/>
 
#After the programming is completed, connect the TF card to the Raspberry Pi, start the Raspberry Pi, and log in to the terminal of the Raspberry Pi (you can connect the Raspberry Pi to an HDMI display or log in remotely with SSH).<br/>
 
 
 
 
 
#Step 1: Download and enter the Waveshare-DSI-LCD driver folder
 
git clone https://github.com/waveshare/Waveshare-DSI-LCD
 
cd Waveshare-DSI-LCD
 
 
#Step 2: Enter uname  the terminal to view the kernel version and cd to the corresponding file directory -a in
 
#6.1.21 then run the following command
 
cd 6.1.21
 
 
#Step 3: Please check the bits of your system, enter the 32 directory for 32-bit systems, and enter the 64 directory for 64-bit systems
 
cd 32
 
#cd 64
 
 
#Step 4: Enter your corresponding model command to install the driver, pay attention to the selection of the I2C DIP switch
 
#2.8inch DSI LCD 480×640 Driver:
 
sudo bash ./WS_xinchDSI_MAIN.sh 28 I2C0
 
 
#Step 5: Wait for a few seconds, when the driver installation is complete and no error is prompted, restart and load the DSI driver and it can be used normally
 
sudo reboot
 
 
 
<font color="#FF0000">
 
Note: The above steps need to ensure that the Raspberry Pi can be connected to the Internet normally.<br/>
 
</font>
 
5. Wait for the system to restart, it will be able to display and touch normally.<br/>
 
 
 
===Method 2: Program Pre-install Image===
 
1. Click to download [https://drive.google.com/file/d/1jLDQe-9bJgT9N4j6K8wmen64xkQ9yVax/view Waveshare DSI LCD - Pi4 pre-install image] and unzip it to get ".img" file.<br/>
 
2. Connect the TF card to the PC and use [https://files.waveshare.com/upload/d/d7/Panasonic_SDFormatter.zip SDFormatter] to format the TF card.<br/>
 
3. Open [https://files.waveshare.com/upload/7/76/Win32DiskImager.zip Win32DiskImager] software, choose the system image prepared in the first step, and then click "write" to write the system image,<br/>
 
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.<br/>
 
<syntaxhighlight lang="c">
 
dtoverlay=WS_xinchDSI_Screen,SCREEN_type=5,I2C_bus=10
 
dtoverlay=WS_xinchDSI_Touch,invertedx,invertedy,I2C_bus=10
 
</syntaxhighlight>
 
5. Connect the TF card to the Raspberry Pi, and start the Raspberry Pi, wait for about 30 seconds to display and touch normally. <br>
 
 
 
==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.<br/>
 
[[File:4inch-DSI-LCD-Manual-02.jpg]]<br/>
 
 
 
===Method 2: Rotation Display In Lite Version===
 
<pre>
 
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
 
</pre>
 
[[File: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):<br/>
 
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:<br/>
 
<pre>
 
sudo apt-get update
 
sudo apt-get full-upgrade
 
</pre>
 
After updating the system, some files of the originally installed driver may be overwritten, and the driver needs to be reinstalled to display normally.<br/>
 
2. Replace the motherboard<br/>
 
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.<br/>
 
Because Pi4 and Pi3 need to load different driver files, you need to reinstall the driver on the new motherboard to display properly.<br/>
 

Revision as of 03:26, 13 March 2024

name -a