This repository contains example codes for testing the Waveshare 2.8-inch LCD (SKU 27579) using the FireBeetle-ESP32E board. The 2.8 inch LCD from Waveshare uses the ST7789T3 display controller and the CST328 touch controller (in the touch version). This is a PlatformIO project based on the ESP32 Arduino framework.
Even though this project uses the FireBeetle-ESP32E board, you should be able to modify the code for any other targets relatively easily. We specifically used this board because its GDI (General Display Interface) port is compatible with the LCD's connector. A complete tutorial on this display is available in the CIRCUITSTATE website - Interfacing Waveshare 2.8 Inch Capacitive Touch LCD with Arduino
- SKU: 27579
- Display Size: 2.8 inch (71.12 mm) diagonal
- Resolution: 240 x 320 pixels
- Pixel Pitch: 0.18 × 0.18 mm
- Panel Type: TFT
- Color Output: 262K
- Operating Voltage: 3.3V / 5V
- Display Driver: ST7789T3
- Display Interface: 4-wire SPI
- Touch Driver: CST328
- Touch Interface: I2C
- Touch Type: Capacitive
- Touch Points: 5-point touch
- Connectors: 13-pin JST-GH & 18-pin FFC
- Display Dimensions: 43.20 × 57.60 mm
- Module Size: 50.54 × 73.06 mm
All you need to do is clone this repository and open the project in PlatformIO. You can also directly download the ZIP file and extract it to your local machine. It is recommended to install the following software:
- Git - for cloning the repository
- Visual Studio Code - for editing the code
- PlatformIO - for building and uploading the code to the board
After installing everything, open the project folder in VS Code. The PlatformIO extension should automatically install the required libraries and dependencies. Make sure you have an active internet connection.
There are four examples in this project.
- LCD_Test - Tests the basic functionality of the LCD by printing a "Hello World" message on the screen.
- Touch_Test - Tests the touch functionality of the LCD.
- Fonts_Demo - Shows text in different fonts.
- UI_Test - A simple UI test that shows a button and a label.
Each example has its own main.cpp
file. You need to choose the build target/environment for each example to build and upload it to your board. The target can be selected from the bottom panel of the VS Code. The default target is LCD_Test
.
- Waveshare 2.8 inch LCD - Product Page
- Waveshare 2.8 Inch Capacitive Touch LCD – Wiki
- FireBeetle-ESP32E - Product Page
- Interfacing Waveshare 2.8 Inch Capacitive Touch LCD with Arduino
- CSE_CST328 - Touch controller Arduino library from CIRCUITSTATE
- CSE_Touch - Unified touch Arduino library from CIRCUITSTATE
- CSE_UI - GUI Arduino library from CIRCUITSTATE
- TFT_eSPI - TFT library from Bodmer
- Buy Waveshare 2.8 Inch Capacitive Touch LCD – Hubtronics