4inch DPI LCD (C)
4inch Square Capacitive Touch Screen LCD (C) for Raspberry Pi, 720×720, DPI, IPS, toughened glass cover, low power solution.
- 4inch IPS Display, 720 X 720 hardware resolution.
- Designed for Raspberry Pi, based on Raspberry Pi 40pin GPIO interface.
- Using DPI666 interface of Raspberry Pi to drive LCD, refresh rate up to 60Hz.
- Drive capacitive touch through I2C interface of Raspberry Pi, 5-points touch, toughened glass panel, hardness up to 6H.
- Supports Raspberry Pi OS / Ubuntu / Kali systems.
Using with Raspberry Pi
If you don't know the difference between the two branches of Raspberry Pi OS, you can check the following introduction #Introducing the Raspberry Pi OS fork
For Raspberry Pi OS Bullseye branch
Please download the latest version of the image from the Raspberry Pi official website.
1. Download the compressed file to the PC, and extract the img file.
2. Connect the TF card to the PC and use SDFormatter 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, add the following code at the end of config.txt and save it
dtoverlay=vc4-kms-v3d dtoverlay=vc4-kms-DPI-4inch dtoverlay=waveshare-4dpic-3b-4b dtoverlay=waveshare-4dpic-3b dtoverlay=waveshare-4dpic-4b
5. Download the 4inch DPI LCD (C)-KMS display file and put it in the /boot/overlays directory of the TF card, and eject the TF card safely.
6. Turn on the LCD backlight switch.
7. Insert the TF card into the Raspberry Pi, power on the Raspberry Pi, and wait for about thirty seconds to display normally.
For Raspberry Pi OS Buster branch and Ubuntu system
1. 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 safely eject the TF card.
gpio=0-9=a2 gpio=12-17=a2 gpio=20-25=a2 dtoverlay=dpi24 enable_dpi_lcd=1 display_default_lcd=1 extra_transpose_buffer=2 dpi_group=2 dpi_mode=87 dpi_output_format=0x7f216 dpi_timings=720 0 46 2 42 720 0 16 2 18 0 0 0 60 0 60000000 6 dtoverlay=waveshare-4dpic-3b-4b dtoverlay=waveshare-4dpic-3b dtoverlay=waveshare-4dpic-4b
2. Download the 4inch DPI LCD (C)-KMS display file and put it in the /boot/overlays directory of the TF card, and eject the TF card safely.
3. Turn on the LCD backlight switch.
4. Insert the TF card into the Raspberry Pi, power on the Raspberry Pi, and wait for about thirty seconds to display normally.
Introducing the Raspberry Pi OS fork
On December 2, 2021, the Raspberry Pi OS for Raspberry Pi split into two branches, the Buster branch and the Bullseye branch.
The Buster branch is a continuation of the old system, which is more stable and uses raspicam as the default camera subsystem.
The Bullseye branch adds some new features, including KMS as the default display driver and libcamera as the default camera subsystem.
Image download address
More detailed information can be found at:
Notes:The above information was updated on January 24, 2022. Due to the frequent update of the Raspberry Pi image, when you see this information, the relevant information may be out of date. The actual performance of the image shall prevail. This is for reference only.
Screen orientation settings
Update software version
Raspberry Pi OS Bullseye branch needs to update the software version, and this step can be omitted for other systems.
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 line dtoverlay=vc4-kms-v3d or dtoverlay=vc4-fkms-v3d is turned on.
With KMS or FKMS driver loaded
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 rebooting the system. #0: rotate 0 degrees; 1: rotate 270 degrees; 2: rotate 180 degrees; 3: rotate 90 degrees xrandr -o 1
No KMS or FKMS driver loaded
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 rebooting the system. #0: rotate 0 degrees; 1: rotate 90 degrees; 2: rotate 180 degrees; 3: rotate 270 degrees display_rotate=3
After the display is rotated, the position of touch is incorrect because the touch doesn’t change with the display angle. So the touch also needs to be modified.
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:
After completing these steps. The LCD could rotate 90 degrees both display and touch function.
90 degree: Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
180 degree: Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
270 degree: Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
Disable power saving.
If you want to keep the display turning on all the time, you can disable the power saving function.
Modify file lightdm.conf
sudo nano /etc/lightdm/lightdm.conf
Find the [SeatDefaults] option and uncomment the line"xserver-command", modify it as below:
Modify this code to
xserver-command=X -s 0 -dpms
- -s # –Disable the display protecting.
- dpms Disable power saving.
Turn on/off HDMI output
You can use the following commands to disable/enable the displaying.
vcgencmd display_power 0 vcgencmd display_power 1
Adjust brightness by PWM
Update wiringPi if you use Pi4.
wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb gpio -v # It should be 2.52 version
Change the brightness by the following command
gpio -g mode 18 pwm #Set the pin for PWM gpio pwmc 100 gpio -g pwm 18 0 #Bightest gpio -g pwm 18 1023 #Dimest gpio -g mode 18 out #Clean the GPIO
The pins labeled "NC" below means that those pins of Raspberry Pi are not occupied by the LCD, and the user can use them for other applications.
|1||NC||Power positive (3.3V power input)|
|2||5V||Power positive (5V power input)|
|4||5V||Power positive (5V power input)|
|7||B0||RGB signal cable|
|8||G2||RGB signal cable|
|10||G3||RGB signal cable|
|11||G5||RGB signal cable|
|13||TP_INT||Touch Panel interrupt|
|15||R2||RGB signal cable|
|16||R3||RGB signal cable|
|17||NC||Power positive (3.3V power input)|
|18||R4||RGB signal cable|
|19||TP_SDA||I2C SDA for touch panel|
|21||B5||RGB signal cable|
|22||R5||RGB signal cable|
|23||TP_SCL||I2C SCL for touch panel|
|24||B4||RGB signal cable|
|26||B3||RGB signal cable|
|28||DE||LCD data enable|
|29||B1||RGB signal cable|
|31||B2||RGB signal cable|
|32||G0||RGB signal cable|
|33||G1||RGB signal cable|
|36||G4||RGB signal cable|
|38||R0||RGB signal cable|
|40||R1||RGB signal cable|
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:
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.
If you require technical support, please go to the Support page and open a ticket.