Raspberry Pi Touch Display 2

From Waveshare Wiki
Jump to: navigation, search

Features

  • 7inch DSI touch screen, supports five-point capacitive touch control
  • IPS display panel with hardware resolution of 720×1280
  • Compatible with Raspberry Pi 5/4B/CM4/3B+/3A+/3B/CM3+/CM3
  • Directly drive the LCD through the Raspberry Pi's DSI interface, with a refresh rate of up to 60Hz
  • When used with Raspberry Pi, it is compatible with Bookworm/Bullseye/Buster systems
  • Supports software to adjust the brightness of the backlight

Hardware connection

Working with Raspberry Pi 5

1. Use the "Pi5 DSI FFC cable" to connect the DSI port of the display to the 22PIN DSI1 port of the Raspberry Pi motherboard.
2. Use the "GPIO cable" to connect the power connector of the display to the pin header of the Raspberry Pi motherboard.
3. Secure the Raspberry Pi to the display.

The installation effect is as follows:
600px-DSC 0208.jpg

Note: Make sure that the DSI cable is connected in correct direction and 5V power is supplied through the GPIO pins.

Working with Raspberry Pi4B/3B+/3B/3A+

1. Use the "Pi4 DSI FFC cable" to connect the DSI port of the display to the DSI port of the Raspberry Pi motherboard.
2. Use the "GPIO cable" to connect the power connector of the display to the pin header of the Raspberry Pi motherboard.
3. Secure the Raspberry Pi to the display.

The installation effect is as follows:
600px-DSC 0209.jpg

Note: Make sure that the DSI cable is connected in correct direction and 5V power is supplied through the GPIO pins.

Software settings

For Bookworm/Bullseye/Buster system

  • 1. Connect the TF card to the PC, download and use Raspberry Pi Imager to burn the corresponding system image.

800x480-DSI-LCD-0.png

  • 2. After the image flashing is completed, insert the TF card into the Raspberry Pi, power on the Raspberry Pi, and wait for a few seconds normally to enter the display. After the system starts, it can be touched normally.

Touch screen virtual keyboard

Raspberry Pi OS Bookworm and later versions include Squeekboard on-screen keyboard by default. When a touch display is attached, the on-screen keyboard should automatically show when it is possible to enter text and automatically hide when it is not possible to enter text.
600px-Image-3.png
For applications which do not support text entry detection, use the keyboard icon at the right end of the taskbar to manually show and hide the keyboard.
Image-4.png
You can also permanently show or hide the on-screen keyboard in the Display tab of Raspberry Pi Configuration or the Display section of raspi-config.
In Raspberry Pi OS releases prior to Bookworm, use matchbox-keyboard instead. If you use the wayfire desktop compositor, use wvkbd instead.

Adjusting Backlight Brightness

  • 1. Open the "Screen Configuration" application;

Pi5-mipiDSI-Brightness-0.png

  • 2. Go to "Screen" -> "DSI-2" -> "Brightness", check the backlight brightness you need to set, and finally click "Apply" to complete the backlight setting.

Pi5-mipiDSI-Brightness.png

Waveshare also provides a corresponding demo (the demo is only used for Bookworm and Bullseye systems), users can download, install and use in the following way:

wget https://files.waveshare.com/wiki/common/Brightness.zip
unzip Brightness.zip
cd Brightness
sudo chmod +x install.sh
./install.sh

After the installation is completed, you can open the demo in the Start Menu -> Accessories -> Brightness, as shown below:

43H-800480-IPS-CT-details-13.gif

In addition, you can also control the brightness of the backlight by entering the following command on the terminal:

echo X | sudo tee /sys/class/backlight/*/brightness

Where X represents any number from 0 to 255. 0 means the darkest backlight, and 255 means the brightest backlight. For example:

echo 100 | sudo tee /sys/class/backlight/*/brightness
echo 0 | sudo tee /sys/class/backlight/*/brightness
echo 255 | sudo tee /sys/class/backlight/*/brightness

Bookworm touch screen rotation

  • 1. Open the Screen Configuration application;

600px-DSI-LCD-Bookworm-Rotate-01.png

  • 2. Go to Screen - > DSI-1 - > Touchscreen and check 10-0014 Goodix Capacitive TouchScreen;

600px-4DSI-test-3.png

  • 3.Click Apply, then close the current window, and reboot according to the pop-up prompts to complete the specified touch screen;

DSI-LCD-Bookworm-Rotate-03.png
DSI-LCD-Bookworm-Rotate-05.png

  • 4.Go to Screen > DSI-1 - - > Orientation, check the direction you need to rotate, and finally click Apply to complete the display and touch synchronous rotation.

DSI-LCD-Bookworm-Rotate-04.png
Note: Only the Bookworm system supports the above synchronization rotation method. For the Bullseye and Butser systems, manual separate settings for touch rotation are required after displaying the rotation.

Bullseye/Buster display rotation

  • 1. Open the Screen Configuration application;

DSI-LCD-Bullseye-Rotate-02.png

  • 2.Go to Screen > DS-1 - - > Orientation, check the direction you need to rotate, and finally click Apply to complete the display rotation.

DSI-LCD-Bullseye-Rotate-03.pngDSI-LCD-Bullseye-Rotate-04.png

Bullseye/Buster touch rotation

After some systems display rotation, the touch direction is inconsistent, and you need to perform the following operations to perform touch rotation:
1. Install libinput

sudo apt-get install xserver-xorg-input-libinput
#If you have Ubuntu or Jetson Nano installed. The installation instruction is
sudo apt install xserver-xorg-input-synaptics

2. Create the xorg.conf.d directory under /etc/X11 (if the directory already exists, proceed directly to step 3).

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

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

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 section, add the corresponding rotation angle command in it, and save it
#"90° Right touch rotation:
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
#180° Inverted touch rotation: 
#Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
#270° Left touch rotation: 
#Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
Similar to the position in the following image:

Touch roate.jpg
5. Reboot Raspberry Pi

sudo reboot

After completing the above steps, touching will cause a rotation.

lite version display rotation

sudo nano /boot/firmware/cmdline.txt
#Add a command to display the rotation angle at the beginning of the cmdline.txt file, and save it to take effect after restarting
#Display rotation 90 degrees
video=DSI-1:1280x720@60,rotate=90
#Display rotation 180 degrees
video=DSI-1:1280x720@60,rotate=180
#Display rotation 270 degrees
video=DSI-1:1280x720@60,rotate=270

Screen sleep

Run the following command on the Raspberry Pi terminal and the screen will go to sleep:

xset dpms force off

Note: This instruction is only available for Bullseye and Buster systems.

Touch Display 2 device tree option reference

The vc4-kms-dsi-ili9881-7inch overlay supports the following options:

DT parameter Action
sizex Sets X resolution (default 1280)
sizey Sets Y resolution (default 720)
invx Invert X coordinates
invy Invert Y coordinates
swapxy Swap X and Y coordinates
disable_touch Disables the touch overlay totally

To specify these options, add them, separated by commas, to your dtoverlay line in /boot/firmware/config.txt.
For instance, to invert both X and Y coordinates, use the following line:

dtoverlay=vc4-kms-dsi-ili9881-7inch,invx,invy

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

Resources

FAQ

 Answer:

Replace the image in the directory (/usr/share/plymouth/themes/pix/splash.png) with your customized image


Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)