2.8inch HDMI LCD (H)

From Waveshare Wiki
Jump to: navigation, search
2.8inch HDMI LCD (H)
2.8inch-HDMI-LCD-H-1.jpg

{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Overview

This product is a general-purpose 2.8-inch HDMI display with a resolution of 480 × 640, a toughened glass capacitive touch panel, and an optical bonding process.

It supports Raspberry Pi and Jetson Nano, and can also be used as a computer touch screen.

Features

  • 2.8-inch IPS screen with a hardware resolution of 480 × 640.
  • 5-point capacitive touch, toughed glass panel with up to 6H hardness.
  • When working with Raspberry Pi, it supports Raspberry Pi OS / Ubuntu / Kali / Retropie and WIN10 IoT.
  • When working with Jetson Nano, it supports Ubuntu.
  • When working as a computer monitor, it supports Windows 11 / 10 / 8.1 / 8 / 7.
  • Onboard dual-touch circuitry, USB Type-C or I2C touch, and more application scenarios.
  • Support backlight control, more power saving.

Featured design

2.8inch-HMDI-design.jpg

Working with Raspberry Pi

Supports Raspberry Pi OS / Ubuntu / Kali / Retropie / WIN 10 IoT.

When working with Raspberry Pi, you should set the resolution of the LCD by yourself, otherwise, the LCD screen will not work. For more detailed information, please read the following section.

Please download the latest version of the image on the Raspberry Pi official website.

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

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

3) Open the Win32DiskImager software, select the system image downloaded in step 1, and click 'Write' to write the system image.

4) Add the following lines to the end of config.txt, then save and eject the TF card safely.

hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87
hdmi_timings=480 0 100 16 100 640 0 100 20 100 0 0 0 60 0 42000000 6
dtparam=i2c_arm=on
dtoverlay=waveshare-28HDMI-3b
dtoverlay=waveshare-28HDMI-4b
dtoverlay=waveshare-28HDMI-5b
start_x=1
gpu_mem=128

5) Download the 2.8inch DPI LCD DTBO file and extract 3 dtbo files. Copy these three files to the overlays directory (/boot/overlays/)

6) Save and quit the TF card safely, and insert the TF card into the Raspberry Pi.

7) Switch the touch interface selection switch to "I2C".

8) Install the 2.8inch HDMI LCD (H) through the Pogo pins on the back of the LCD, and the Raspberry Pi GPIO interface will be connected to the power supply and touch pins of the LCD through Pogo pins.

9) Connect the HDMI interface of the LCD to the HDMI interface of the Raspberry Pi, power on the Raspberry Pi, and wait for more than ten seconds until the LCD displays normally.

【Note】This product is in portrait mode by default, and the resolution (H×V) is 480×640. You can modify the display direction on the horizontal screen through software settings. For details, please refer to #Raspberry Pi Display Rotation.

Raspberry Pi Display Rotation

Update software version

Raspberry Pi OS Bullseye branch needs to update the software version, other systems can omit this step.

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

Raspberry Pi OS and Kali display rotation

First check whether the KMS or FKMS driver is loaded on the system you are using.

Check method: In /boot/config.txt, check whether the dtoverlay=vc4-kms-v3d or dtoverlay=vc4-fkms-v3d turned on.

  • If you have loaded KMS or FKMS driver

You can use the following command for display rotation:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
#Enter the command corresponding to the display rotation angle at the end of the autostart file, and it will take effect after restarting
#0: rotate 0 degrees; 1: rotate 270 degrees; 2: rotate 180 degrees; 3: rotate 90 degrees
xrandr -o 1
  • If you haven't loaded KMS or FKMS driver

You can use the following command for display rotation:

sudo nano /boot/config.txt
#Enter the command corresponding to the display rotation angle at the end of the config.txt file, and it will take effect after restarting
#0: rotate 0 degrees; 1: rotate 90 degrees; 2: rotate 180 degrees; 3: rotate 270 degrees
display_rotate=3

Ubuntu display rotation

First, check whether the KMS or FKMS driver is loaded on the system you are using.

Check method: In /boot/firmware/config.txt, check whether the corresponding motherboard has dtoverlay=vc4-kms-v3d or dtoverlay=vc4-fkms-v3d turned on.

  • If you have loaded KMS or FKMS driver

Use the following methods for display rotation.

Note: For different versions of Ubuntu systems, the interface may be different. Generally, you can find the Displays application and rotate it.
GPIO-HDMI-Manual-01.png
GPIO-HDMI-Manual-02.png
GPIO-HDMI-Manual-03.png
Execute the command to rotate the Ubuntu login interface. If the Ubuntu login interface is not opened, this step can be skipped:

#For 32-bit systems, execute the following command, replace your_user with the currently logged in user name
sudo cp /home/<your_user>/.config/monitors.xml /var/lib/lightdm/.config
#For 64-bit systems, execute the following command, replace your_user with the currently logged in user name
sudo cp /home/<your_user>/.config/monitors.xml /var/lib/gdm3/.config
sudo chown gdm:gdm /var/lib/gdm3/.config/monitors.xml

Execute the following command to rotate the command line display during startup:

sudo nano /boot/firmware/cmdline.txt
#Add the following code at the end to rotate the command line
#rotate 0 degrees
fbcon=rotate:0 video=HDMI-A-1:640x480M@60,rotate=0
#Rotate 90 degrees
fbcon=rotate:3 video=HDMI-A-1:640x480M@60,rotate=90
#rotate 180 degrees
fbcon=rotate:2 video=HDMI-A-1:640x480M@60,rotate=0
#rotate 270 degrees
fbcon=rotate:1 video=HDMI-A-1:640x480M@60,rotate=270
  • If you haven't loaded KMS or FKMS driver

Rotation is relatively simple, just use the following command to display rotation:

sudo nano /boot/firmware/config.txt
#Enter the command corresponding to the display rotation angle at the end of the config.txt file, and it will take effect after restarting
#0: rotate 0 degrees; 1: rotate 90 degrees; 2: rotate 180 degrees; 3: rotate 270 degrees
display_rotate=3

Touch Rotating on the Raspberry Pi

After the display is rotated, the position of the touch is incorrect because the touch doesn’t change with the display angle. So the touch also needs to be modified.

1. Install libinput.

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

If the system you installed is Ubuntu or Jetson Nano. The installation code 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 directory you created just now.

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

4. Edit this file.

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

Find the part of the touchscreen, add the following statement inside, and then save the file.

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

Similar to the picture below:

Touch roate.jpg
5. save and reboot your Pi

sudo reboot


After completing these steps. The LCD could rotate 90 degrees for both the display and touch functions.

Note:

90 degrees: Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"

180 degrees: Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"

270 degrees: Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"

Use with PC

The LCD can work on PC version Windows 11 /10 / 8.1 / 8 / 7 system. Instructions:

1) Switch the touch interface selector switch to "USB".
2) Connect the Power&Touch interface of the LCD to the USB interface of the PC.
3) Connect the Display port of the LCD to the HDMI port of the PC.
Note: This product defaults to vertical display, and the resolution (H×V) is 480×640. It can be displayed in the landscape by modifying the software settings, see #Windows Rotation.


Windows Rotation

  • 1. Right-click the desktop and enter "Display Settings":
W-R-3.png
  • 2. Click the Identity to detect the display.
    • Choose the display, set the display mode to extend, and change the orientation.
W-R-2.png

Working with Jetson nano

1) Switch the Touch port selection switch to "USB".

2) Connect the Power&Touch interface of the LCD to the USB interface of the Jetson nano.

3) Connect the Display interface of the LCD to the HDMI interface of the Jetson nano.

Others

Backlight control

  • Though Power button to turn on/off the backlight of the LCD.
  • Though UP/DOWN button to control the backlight brightness.
2.8inch-HDMI-LCD-H-Manual-04.jpg

Resource

FAQ

 Answer:

Add the following command to /boot/config.txt:

disable_splash=1
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:

Replace the custom image with the image in this directory /usr/share/plymouth/themes/pix/splash.png.

{{{3}}}
{{{4}}}

{{{5}}}


 Answer:

Test environment: 2022-04-04-raspios-bullseye-armhf 32-bit system
Supported models: Support Waveshare DSI LCD, DPI LCD, and HDMI LCD capacitive touch screen series.Only support 32bit system

Software Installation

wget https://files.waveshare.com/upload/1/18/Evdev-right-click-emulation.zip
unzip Evdev-right-click-emulation.zip
cd evdev-right-click-emulation
sudo apt install build-essential libevdev2 libevdev-dev
cd 'evdev-right-click-emulation'
sudo cp 'out/evdev-rce' '/usr/local/bin/'
sudo chmod +x '/usr/local/bin/evdev-rce'

Enter the command:

sudo evdev-rce

After running, you can touch and long press to realize the right-click function.

Set IP

sudo usermod -G 'input' -a pi
echo 'uinput' | sudo tee -a /etc/modules
sudo nano  /etc/udev/rules.d/99-uinput.rules

Add in 99-uinput.rules file.

KERNEL=="uinput", MODE="0660", GROUP="input"

save it and run it in the terminal.

sudo udevadm control --reload-rules
sudo udevadm trigger

Then reboot:

sudo reboot

Run after reboot (no sudo needed at this point).

evdev-rce

After running, you can touch and long press to realize the right-click function.

Set Startup

Enter the terminal:

sudo mkdir ~/.config/autostart
sudo nano ~/.config/autostart/right_click.desktop

Add the following in right_click.desktop.

[Desktop Entry]
Version=1.0
Type=Application
Name=evdev-rce
GenericName=Enable long-press-to-right-click gesture
Exec=env LONG_CLICK_INTERVAL=1000 LONG_CLICK_FUZZ=200  /usr/local/bin/evdev-rce
Terminal=true
StartupNotify=false

#If you want to modify the sensitivity, you can modify the size of the two parameters, LONG_CLICK_INTERVAL=1000 LONG_CLICK_FUZZ=200.

{{{5}}}



 Answer:

It depends on the system, if the system has hibernation, the screen will also be black. If it is the official system of Raspberry Pi, the default is about ten minutes without action to have hibernation.


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)