4inch HDMI LCD (C)

From Waveshare Wiki
Jump to: navigation, search
4inch HDMI LCD (C)
720 x 720, IPS
540px-4inch-HDMI-LCD-C-1.jpg

4inch Resistive Touch Screen LCD(C), HDMI interface, IPS Screen, Designed for Raspberry Pi
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Introduction

Features

  • 4-inch IPS screen, hardware resolution is 720 × 720.
  • 5-point capacitive touch, toughened glass panel, hardness up to 6H.
  • When used with Raspberry Pi, it supports Raspberry Pi OS / Ubuntu / Kali and Retropie.
  • Ubuntu is supported when used with Jetson Nano.
  • When used as a computer monitor, it supports Windows 11/10/8.1/8/7.
  • Onboard dual touch circuit, optional USB Type-C or I2C touch, it has more application scenarios.
  • With 3.5mm audio and speaker interface, it supports HDMI audio output.

Featured Design

Design(1).jpg

Use with Raspberry Pi

Hardware Connection

1. Set the touch switch on the back of the screen to "I2C".
2. Fix the Raspberry Pi to the screen through the copper posts, and pay attention to aligning the position of the ejector pins.
3. Connect the HDMI port of the Raspberry Pi to the LCD.
Note: Raspberry Pi Zero / Zero 2 W needs an additional HDMI cable for connection.
The hardware connection is as shown below (Pi 4 and Pi 3B+):
4inch-HDMI-LCD-C-Manual-02.jpg
4inch-HDMI-LCD-C-Manual-03.jpg

Software Connection

Raspberry Pi OS / Ubuntu / Kali and Retropie systems for Raspberry Pi.
Please download the latest version of the image from the Raspberry Pi official website.
When the LCD works on systems such as Raspberry Pi, the resolution must be manually set, otherwise it will cause abnormal display. When the LCD works on the PC version of Windows system, there is no such problem.
1.Please download the latest version of the image from the Raspberry Pi official website. Download the compressed file to your PC, and extract the .img file.
2.Connect the TF card to the PC and use SDFormattersoftware to format the TF card.
3.Open the Win32DiskImager software, select the system image prepared in step 1, and click write to burn the system image.
4.After the programming is completed, open the config.txt file in the root directory of the TF card, and add the following code at the end of config.txt

dtparam=i2c_arm=on
dtoverlay=waveshare-4dpic-3b
dtoverlay=waveshare-4dpic-4b
dtoverlay=waveshare-4dpic-5b
hdmi_force_hotplug=1 
config_hdmi_boost=10
hdmi_group=2 
hdmi_mode=87 
hdmi_timings=720 0 100 20 100 720 0 20 8 20 0 0 0 60 0 48000000 6
start_x=0
gpu_mem=128

5.Download the 4inch HDMI LCD (C) DTBO file and extract 3 dtbo files. Copy the 3 files to the overlays directory (/boot/overlays/)
6.Save, eject the TF card safely, and insert the TF card into the Raspberry Pi.
7.Power on the Raspberry Pi and wait for more than ten seconds to display normally.

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.

Use with Jetson Nano

1) Switch the touch interface selector switch to "USB".
2) Connect the Power&Touch interface of the LCD to the USB interface of the Jetson Nano.
3) Connect the Display port of the LCD to the HDMI port of the Jetson Nano.

Resource

Drawing

Software

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.


 Answer:
You can enter the following commands in the terminal of the Raspberry Pi system:
sudo -E rpi-eeprom-config --edit

As shown in the figure below, change the 0 in the original DISABLE_HDMI to 1. If there is no such sentence, please add it directly, save the file, and restart the system to block this picture. 7inchC modification.png
Note: This method currently only supports the Raspberry Pi OS system. If there is a problem with other systems, you need to use Raspberry Pi OS to turn off the DISABLE_HDMI of Raspberry Pi 4B, and then use other systems to display it.

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

{{{5}}}


 Answer:
As shown in the figure below, first remove the original soldered resistor, and then connect the following pads to the P1 pin of the Raspberry Pi.

4inch-HDMI-LCD-C-FAQ02.png

Execute the following command in the Raspberry Pi terminal:

gpio -g pwm 18 1024

gpio -g mode 18 pwm (Occupied pins are PWM pins)

gpio pwmc 1000

Control brightness: gpio -g pwm 18 X (X value is between 0~1024)

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

{{{5}}}


Anti-Piracy

Since the first-generation Raspberry Pi released, Waveshare has been working on designing, developing, and producing various fantastic touch LCDs for the Pi. Unfortunately, there are quite a few pirated/knock-off products in the market. They're usually some poor copies of our early hardware revisions, and comes with none support service.

To avoid becoming a victim of pirated products, please pay attention to the following features when purchasing:

RPi-LCD-Anti-Piracy.jpg

(Click to enlarge)

Beware of knock-offs

Please note that we've found some poor copies of this item in the market. They are usually made of inferior materials and shipped without any testing.

You might be wondering if the one you're watching or you've purchased in other non-official stores is original, feel free to contact us.

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 AM GMT+8 (Monday to Friday)