Difference between revisions of "Template:7inch DSI LCD User Manual"

From Waveshare Wiki
Jump to: navigation, search
m (Text replacement - "http://www.waveshare.com/w/upload/" to "https://files.waveshare.com/upload/")
Line 97: Line 97:
 
[[File: 43H-800480-IPS07.GIF]]
 
[[File: 43H-800480-IPS07.GIF]]
  
 +
==Display Orientation==
 +
'''If you are using a Bullseye/Buster system, you can rotate it as follows:'''<br/>
 +
*1. Go to Screen Configuration.<br/>
 +
[[File:21.5inch FHD Monitor 09.png]]
 +
*2. Rotate as shown below:
 +
[[File:21.5inch FHD Monitor 10.png]]<br/>
 +
[[File:21.5inch FHD Monitor 11.png]]<br/>
 +
[[File:21.5inch FHD Monitor 12.png]]<br/>
 +
'''If you use other systems, you can rotate the display as shown below:'''<br/>
 +
*1. Add the following sentence in the config.txt file (the config file is located in the root directory of the TF card, or /boot):
 +
display_rotate=1 #1:90;2: 180; 3: 270
 +
*2. Reboot the Raspberry Pi after saving.
 +
sudo reboot
 +
 +
===Touch Rotation===
 +
As the touch direction is different after rotating, you need to rotate the touch as shown below:<br/>
 +
1. Install libinput<BR/>
 +
<pre>sudo apt-get install xserver-xorg-input-libinput</pre>
 +
If the system you want to install is Ubuntu or Jetson Nano, the installation command is:<br/>
 +
sudo apt install xserver-xorg-input-synaptics
 +
2. Create xorg.conf.d directory in /etc/X11/. (If the directory exists, you can directly skip to Step 3.)
 +
sudo mkdir /etc/X11/xorg.conf.d
 +
3. Copy 40-libinput-conf file to the directory created just now.
 +
sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
 +
4. Edit the file.
 +
sudo nano /etc/X11/xorg.conf.d/40-libinput.conf
 +
Find the touchscreen part, add the following sentence, and then save.
 +
  Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
 +
As shown below:<br/>
 +
[[ File: Touch roate.jpg]]<br/>
 +
5. Reboot the Raspberry Pi.
 +
sudo reboot
 +
After finishing the above steps, the touch can be rotated 90 degrees.<br/>
 +
 +
'''Note''':<br/>
 +
90-degree rotation: Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"<br/>
 +
180-degree rotation: Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"<br/>
 +
270-degree rotation: Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
 
===Sleep===
 
===Sleep===
 
Run the following commands on the Raspberry Pi terminal, and the screen will enter sleep mode:
 
Run the following commands on the Raspberry Pi terminal, and the screen will enter sleep mode:
 
  xset dpms force off
 
  xset dpms force off
 +
 
===Disable touching===
 
===Disable touching===
 
If you want to disable the touch function, you can modify the config.txt file, add the following line to the file, and reboot.
 
If you want to disable the touch function, you can modify the config.txt file, add the following line to the file, and reboot.

Revision as of 07:15, 21 November 2023

Features

  • 7inch TFT screen with a hardware resolution of 800 x 480.
  • Capacitive touch panel supports 5-point touch.
  • Supports Pi 4B/3B+/3A+/3B/2B/B+/A+. Another DSI-Cable-15cm is required for CM3/3+/4.
  • As it directly drives LCD by the DSI interface of Raspberry Pi, the refreshing rate is up to 60Hz.
  • Supports Raspberry Pi OS / Ubuntu / Kali and Retropie when used with Raspberry Pi, drive-free.
  • Backlight adjustable via the software.

User guide

Hardware connection

1) Connect the DSI interface of 7inch DSI LCD to the DSI interface of Raspberry Pi with a 15PIN FPC cable.

2) Use the 2PIN power cable to connect the power interface of the LCD to the 40PIN GPIO interface of the Raspberry Pi, as below:

7inch-DSI-LCD-50.jpg

3) You can fix the Raspberry Pi on the backside of the 7inch DSI LCD with screws.
The installation effect is shown in the following figure:

7inch-DSI-LCD-5.jpg

Software setting

Supports Raspberry Pi OS / Ubuntu / Kali and Retropie systems for Raspberry Pi.
1) Download the image from the Raspberry Pi website.

2) Download the compressed file to the PC, and unzip it to get the .img file.

3) Connect the TF card to the PC, and use SDFormatter software to format the TF card.

4) Open the Win32DiskImager software, select the system image downloaded in step 2, and click ‘Write’ to write the system image.

5) After the programming is completed, 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 eject the TF card safely.

dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dsi-7inch

6) Power on the Raspberry Pi and wait for a few seconds until the LCD displays normally. And the touch function can also work after the system starts.


Backlight Controlling

  • Open a terminal and type the following command to adjust the brightness.

Note: If the command reports the 'Permission denied' error, please switch to the 'root' user mode and execute it again.

echo X >  /sys/class/backlight/rpi_backlight/brightness
X can be valued in the range of 0~255. The backlight is darkest if you set it to 0. If you set it to 255, the backlight is the lightest.
echo 100 >  /sys/class/backlight/rpi_backlight/brightness
echo 0 >  /sys/class/backlight/rpi_backlight/brightness
echo 255 >  /sys/class/backlight/rpi_backlight/brightness
  • We also provide an example for brightness adjusting (This demo is only for Raspberry Pi OS system), you can download and install it by following commands:
wget https://files.waveshare.com/upload/f/f4/Brightness.zip
unzip Brightness.zip
cd Brightness
sudo chmod +x install.sh
./install.sh
After connecting, you can choose Menu -> Accessories -> Brightness to open the adjustment software.

43H-800480-IPS07.GIF

Display Orientation

If you are using a Bullseye/Buster system, you can rotate it as follows:

  • 1. Go to Screen Configuration.

21.5inch FHD Monitor 09.png

  • 2. Rotate as shown below:

21.5inch FHD Monitor 10.png
21.5inch FHD Monitor 11.png
21.5inch FHD Monitor 12.png
If you use other systems, you can rotate the display as shown below:

  • 1. Add the following sentence in the config.txt file (the config file is located in the root directory of the TF card, or /boot):
display_rotate=1 #1:90;2: 180; 3: 270
  • 2. Reboot the Raspberry Pi after saving.
sudo reboot

Touch Rotation

As the touch direction is different after rotating, you need to rotate the touch as shown below:
1. Install libinput

sudo apt-get install xserver-xorg-input-libinput

If the system you want to install is Ubuntu or Jetson Nano, the installation command is:

sudo apt install xserver-xorg-input-synaptics

2. Create xorg.conf.d directory in /etc/X11/. (If the directory exists, you can directly skip to Step 3.)

sudo mkdir /etc/X11/xorg.conf.d

3. Copy 40-libinput-conf file to the directory created just now.

sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/

4. Edit the file.

sudo nano /etc/X11/xorg.conf.d/40-libinput.conf 

Find the touchscreen part, add the following sentence, and then save.

 Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"

As shown below:
Touch roate.jpg
5. Reboot the Raspberry Pi.

sudo reboot

After finishing the above steps, the touch can be rotated 90 degrees.

Note:
90-degree rotation: Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
180-degree rotation: Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
270-degree rotation: Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"

Sleep

Run the following commands on the Raspberry Pi terminal, and the screen will enter sleep mode:

xset dpms force off

Disable touching

If you want to disable the touch function, you can modify the config.txt file, add the following line to the file, and reboot.

disable_touchscreen=1

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