The ESP32 2.8 CYD is a versatile microcontroller module that combines Wi-Fi and Bluetooth connectivity with a 2.8-inch touchscreen display. This component is ideal for Internet of Things (IoT) applications, offering robust processing power and a graphical interface for user interaction. Its compact design and rich feature set make it suitable for a wide range of embedded projects, including smart home devices, industrial automation, and portable monitoring systems.
Parameter | Value |
---|---|
Microcontroller | ESP32 Dual-Core Processor |
Display | 2.8-inch TFT LCD Touchscreen |
Wi-Fi Standard | 802.11 b/g/n |
Bluetooth Version | Bluetooth 4.2 (BLE + Classic) |
Operating Voltage | 3.3V |
Input Voltage Range | 5V (via USB) or 3.3V (via pins) |
Flash Memory | 4MB |
SRAM | 520KB |
GPIO Pins | 30 |
Communication Interfaces | UART, SPI, I2C, PWM, ADC, DAC |
Touchscreen Type | Resistive |
Dimensions | 85mm x 55mm x 12mm |
Pin Number | Pin Name | Description |
---|---|---|
1 | VIN | Power input (5V via USB or external source) |
2 | GND | Ground |
3 | GPIO0 | General-purpose I/O pin, can be used for input/output |
4 | GPIO1 | General-purpose I/O pin, supports UART TX |
5 | GPIO2 | General-purpose I/O pin, supports UART RX |
6 | GPIO3 | General-purpose I/O pin, supports PWM |
7 | SDA | I2C Data Line |
8 | SCL | I2C Clock Line |
9 | MOSI | SPI Master Out Slave In |
10 | MISO | SPI Master In Slave Out |
11 | SCK | SPI Clock |
12 | A0 | Analog input (ADC) |
13 | A1 | Analog input (ADC) |
14 | TXD | UART Transmit |
15 | RXD | UART Receive |
16 | TOUCH_X+ | Touchscreen X-axis positive |
17 | TOUCH_X- | Touchscreen X-axis negative |
18 | TOUCH_Y+ | Touchscreen Y-axis positive |
19 | TOUCH_Y- | Touchscreen Y-axis negative |
Powering the Module:
Connecting the Touchscreen:
TOUCH_X+
, TOUCH_X-
, TOUCH_Y+
, and TOUCH_Y-
pins. Programming the ESP32:
Interfacing with Peripherals:
Below is an example of how to use the ESP32 2.8 CYD to display text on the touchscreen and connect to Wi-Fi.
#include <WiFi.h>
#include <TFT_eSPI.h> // Library for the TFT display
// Wi-Fi credentials
const char* ssid = "Your_SSID";
const char* password = "Your_PASSWORD";
// Initialize the TFT display
TFT_eSPI tft = TFT_eSPI();
void setup() {
// Initialize serial communication
Serial.begin(115200);
// Initialize the TFT display
tft.init();
tft.setRotation(1); // Set display orientation
tft.fillScreen(TFT_BLACK); // Clear the screen
tft.setTextColor(TFT_WHITE, TFT_BLACK); // Set text color
// Display a message
tft.setCursor(10, 10);
tft.setTextSize(2);
tft.println("Connecting to Wi-Fi...");
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
// Display connection status
tft.fillScreen(TFT_BLACK);
tft.setCursor(10, 10);
tft.println("Wi-Fi Connected!");
tft.setCursor(10, 40);
tft.println("IP Address:");
tft.setCursor(10, 70);
tft.println(WiFi.localIP());
}
void loop() {
// Add your main code here
}
The ESP32 does not power on:
Wi-Fi connection fails:
Touchscreen is unresponsive:
TOUCH_X+
, TOUCH_X-
, TOUCH_Y+
, and TOUCH_Y-
pins. Display shows no output:
By following this documentation, you can effectively integrate the ESP32 2.8 CYD into your projects and troubleshoot common issues.