2.8inch DPI LCD
- 1 Introduction
- 2 Features
- 3 How to use
- 4 Rotation(Working with Raspberry Pi)
- 5 Knob introduction
- 6 Others
- 7 Interface
- 8 Resource
- 9 FAQ
- 10 Anti-Piracy
- 11 Beware of knock-offs
- 12 Support
480x640, 2.8inch IPS Display for Raspberry Pi, DPI interface, 5-points capacitive touch control.
- 2.8inch IPS Display， 480×640 hardware resolution.
- Designed for Raspberry Pi, based on Raspberry Pi 40pin GPIO interface.
- Using DPI666 (262K Colors) 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 Raspbian and Kali systems.
How to use
This LCD can support Raspbian and Kali systems.
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, use SDFormatter.exe software to format the TF card.
3) Open the Win32DiskImager.exe software, select the system image downloaded in step 1, and click‘Write’ to write the system image.
4) After the image has finished writing, open the config.txt file in the root directory of the TF card(/boot/), add the following code at the end of config.txt, then save and quit the TF card safely.
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 hdmi_timings=480 0 26 16 10 640 0 25 10 15 0 0 0 60 0 32000000 1 dtoverlay=waveshare-28dpi-3b-4b dtoverlay=waveshare-28dpi-3b dtoverlay=waveshare-28dpi-4b
Note: For Raspberry Pi 4, you need to comment out dtoverlay=vc4-fkms-V3D.
5)Download the File:28DPIB DTBO.zip and extract 3 dtbo files. Copy these three files to the overlays directory (/boot/overlays/), as shown in the following figure:
6) Save and quit the TF card safely, and insert the TF card into the Raspberry Pi.
7) Insert the 4inch DPI LCD (B) into the 40PIN GPIO interface of the Raspberry Pi, power on the Raspberry Pi, and wait for about ten seconds to display normally.
Rotation(Working with Raspberry Pi)
Add this statement in the config.txt file (the config file is located in the root directory of the TF card, which is named /boot):
display_rotate=1 #1：90；2: 180； 3: 270
And then restart the Raspberry Pi after saving.
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"
- Backlight: Adjust the screen brightness.
- Volume: Adjust the speaker volume.
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.
Control brightness by PWM
Note: This method can only support Raspberry Pi 3B+ and the older version, it cannot support Pi 4.
gpio -g mode 18 pwm #Configure the PWM pin gpio pwmc 100 gpio -g pwm 18 1023 #Set it brightnest gpio -g pwm 18 0 #Set it dimmest gpio -g mode 18 out #Free the pin and set it as output
Turn on/off the LCD
You can turn on/off the LCD with the following command.
Note: The command can only work when the PWM pin is free and in output mode.
sudo echo 1 | sudo tee /sys/class/backlight/rpi_backlight/bl_power sudo echo 0 | sudo tee /sys/class/backlight/rpi_backlight/bl_power
|7||B2||RGB signal lines|
|8||G4||RGB signal lines|
|10||G5||RGB signal lines|
|11||G7||RGB signal lines|
|12||PWM||Backlight control (Pi4 can only turn on/off the backlight. Only the eralier versions support brightness adjustment with PWM)|
|13||TP_INT||Interrupt pin of touch panel|
|15||R4||RGB signal lines|
|16||R5||RGB signal lines|
|18||R6||RGB signal lines|
|19||TP_SDA||The I2C SDA of touch panel|
|21||B7||RGB signal lines|
|22||R7||RGB signal lines|
|23||TP_SCL||The I2C SCL of touch panel|
|24||B6||RGB signal lines|
|26||B5||RGB signal lines|
|27||LCD_CLK||Clock pin of LCD panel|
|28||DE||Data enable of LCD panel|
|29||B3||RGB signal lines|
|31||B4||RGB signal lines|
|32||G2||RGB signal lines|
|33||G3||RGB signal lines|
|36||G6||RGB signal lines|
|38||R2||RGB signal lines|
|40||R3||RGB signal lines|
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.