

The ESP32-CYD-2.8 is a versatile development board that integrates the powerful ESP32 microcontroller with a 2.8-inch touchscreen display. This combination makes it an excellent choice for Internet of Things (IoT) applications, user interface (UI) projects, and other embedded systems requiring both connectivity and an interactive display. The ESP32-CYD-2.8 supports Wi-Fi and Bluetooth connectivity, making it ideal for smart home devices, industrial automation, and portable monitoring systems.








The ESP32-CYD-2.8 features a variety of pins for interfacing with external components. Below is the pinout description:
| Pin Name | Type | Description |
|---|---|---|
| VIN | Power Input | Input voltage (5V) for powering the board via USB or external power supply. |
| GND | Ground | Ground connection. |
| 3V3 | Power Output | 3.3V output for powering external components. |
| GPIO0 | Digital I/O | General-purpose I/O pin, also used for boot mode selection. |
| GPIO2 | Digital I/O | General-purpose I/O pin. |
| GPIO4 | Digital I/O | General-purpose I/O pin, supports PWM and ADC. |
| GPIO12-19 | Digital I/O | General-purpose I/O pins, support SPI, I2C, UART, PWM, and ADC. |
| GPIO21 | Digital I/O | General-purpose I/O pin, often used for I2C SDA. |
| GPIO22 | Digital I/O | General-purpose I/O pin, often used for I2C SCL. |
| GPIO25-27 | Digital I/O | General-purpose I/O pins, support DAC and ADC. |
| T_CS | Digital I/O | Chip select pin for the touchscreen controller (XPT2046). |
| T_IRQ | Digital Input | Interrupt pin for the touchscreen controller. |
| T_CLK | Digital Output | Clock pin for the touchscreen controller (SPI interface). |
| T_MOSI | Digital Output | Data input pin for the touchscreen controller (SPI interface). |
| T_MISO | Digital Input | Data output pin for the touchscreen controller (SPI interface). |
Powering the Board:
Connecting the Touchscreen:
Programming the ESP32:
TFT_eSPI and Adafruit_GFX).Interfacing with Peripherals:
Below is an example of initializing the touchscreen and displaying text on the screen:
#include <TFT_eSPI.h> // Include the TFT library
#include <SPI.h> // Include the SPI library
TFT_eSPI tft = TFT_eSPI(); // Create TFT object
void setup() {
tft.init(); // Initialize the display
tft.setRotation(1); // Set display orientation
tft.fillScreen(TFT_BLACK); // Clear the screen with black color
tft.setTextColor(TFT_WHITE, TFT_BLACK); // Set text color (white on black)
tft.setTextSize(2); // Set text size
tft.setCursor(10, 10); // Set cursor position
tft.println("Hello, ESP32!"); // Print text to the screen
}
void loop() {
// Add your code here for touchscreen interaction or other tasks
}
The touchscreen is not responding:
The display shows a blank screen:
Wi-Fi or Bluetooth is not working:
The board overheats during operation:
Can I use the ESP32-CYD-2.8 with a battery?
Yes, you can power the board using a 3.7V LiPo battery with a suitable voltage regulator.
What is the maximum resolution supported by the touchscreen?
The 2.8-inch TFT display supports a resolution of 320x240 pixels.
Is the touchscreen multitouch capable?
No, the touchscreen supports single-touch input only.
Can I use the ESP32-CYD-2.8 with other development environments?
Yes, the board is compatible with ESP-IDF, PlatformIO, and other ESP32-supported environments.