| + Display Type | 2.8-inch TFT LCD |
| + Resolution | 320x240 pixels |
| + Touch Screen | Resistive |
| ESP32 Microcontroller | |
| + Processor | Dual-core Xtensa LX6 |
| + Clock Speed | Up to 240 MHz |
| + RAM | 520 KB |
| + Flash | 4 MB |
| Wi-Fi and Bluetooth | |
| + Wi-Fi | 2.4 GHz |
| + Bluetooth | 4.2 |
| + Display Type | 2.8-inch TFT LCD |
| + Resolution | 320x240 pixels |
| + Touch Screen | Resistive |
| ESP32 Microcontroller | |
| + Processor | Dual-core Xtensa LX6 |
| + Clock Speed | Up to 240 MHz |
| + RAM | 520 KB |
| + Flash | 4 MB |
| Wi-Fi and Bluetooth | |
| + Wi-Fi | 2.4 GHz |
| + Bluetooth | 4.2 |
+ UART
+ SPI
+ I2C
+ I2S
+ ADC
+ DAC
| + Operating Voltage | 3.3V |
| + Power Consumption | < 1W |
| + Module Size | 65x55 mm |
| + Acrylic Case Size | 76x66 mm |
Conclusion
The Elecrow ESP32 Display-2.8 Inch HMI with Touch Screen is a versatile and powerful IoT module that offers a unique combination of display, touch screen, and connectivity capabilities. With its robust specifications and compact design, this module is an ideal solution for developing innovative IoT applications in various industries.
Elecrow ESP32 Display-2.8 Inch HMI with Touch Screen DocumentationOverviewThe Elecrow ESP32 Display-2.8 Inch HMI with Touch Screen is a high-resolution, WiFi, and Bluetooth-enabled Human-Machine Interface (HMI) display module based on the ESP32 microcontroller. It features a 2.8-inch touchscreen display with a resolution of 320x240 pixels, making it suitable for a wide range of IoT applications. The module comes with an acrylic case, providing a compact and durable design.Hardware SpecificationsMicrocontroller: ESP32
Display Type: 2.8-inch Resistive Touch Screen
Display Resolution: 320x240 pixels
Communication Protocols: WiFi, Bluetooth
Power Supply: 3.3V - 5V
Operating Temperature: -20C to 60C
Dimensions: 75x55x20 mm (including acrylic case)Software SupportThe Elecrow ESP32 Display-2.8 Inch HMI with Touch Screen supports multiple programming languages, including C, C++, Python, and MicroPython. It is compatible with the LVGL (Light and Versatile Graphics Library) framework, which provides a comprehensive set of APIs for graphics rendering, touch handling, and more.Code Examples### Example 1: Simple Touch Screen Interface using LVGLThis example demonstrates how to create a simple touch screen interface using LVGL to display a button that toggles an LED on and off.
```c
#include <lvgl.h>
#include <WiFi.h>// Pin definitions
const int ledPin = 2; // LED pin// Create an LVGL display object
lv_disp_t disp = lv_disp_get_default();// Create a screen with a button
lv_obj_t screen = lv_obj_create(NULL, NULL);
lv_obj_set_size(screen, LV_HOR_RES, LV_VER_RES);lv_obj_t btn = lv_btn_create(screen, NULL);
lv_obj_set_size(btn, 100, 50);
lv_obj_set_pos(btn, 100, 100);
lv_obj_set_event_cb(btn, btn_event_cb);
lv_btn_set_text(btn, "Toggle LED");void btn_event_cb(lv_obj_t obj, lv_event_t event) {
if (event == LV_EVENT_SHORT_CLICKED) {
digitalWrite(ledPin, !digitalRead(ledPin));
}
}void setup() {
// Initialize LED pin as output
pinMode(ledPin, OUTPUT);
// Initialize LVGL display
lv_init();
lv_disp_drv_init();
lv_theme_set_default(lv_theme_get_display_default());
// Initialize WiFi
WiFi.begin("your_wifi_ssid", "your_wifi_password");
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
// Create the screen
lv_scr_load(screen);
}void loop() {
// Handle LVGL events
lv_timer_handler();
delay(5);
}
```
### Example 2: WiFi Connection Status Display using LVGLThis example demonstrates how to display the WiFi connection status on the screen using LVGL.
```c
#include <lvgl.h>
#include <WiFi.h>// Create an LVGL display object
lv_disp_t disp = lv_disp_get_default();// Create a screen with a label
lv_obj_t screen = lv_obj_create(NULL, NULL);
lv_obj_set_size(screen, LV_HOR_RES, LV_VER_RES);lv_obj_t label = lv_label_create(screen, NULL);
lv_obj_set_size(label, LV_HOR_RES, 20);
lv_obj_set_pos(label, 0, 10);
lv_label_set_text(label, "WiFi Status: ");void setup() {
// Initialize LVGL display
lv_init();
lv_disp_drv_init();
lv_theme_set_default(lv_theme_get_display_default());
// Initialize WiFi
WiFi.begin("your_wifi_ssid", "your_wifi_password");
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
// Create the screen
lv_scr_load(screen);
}void loop() {
// Update WiFi status label
if (WiFi.status() == WL_CONNECTED) {
lv_label_set_text(label, "WiFi Status: Connected");
} else {
lv_label_set_text(label, "WiFi Status: Disconnected");
}
// Handle LVGL events
lv_timer_handler();
delay(5);
}
```
These examples demonstrate the basic functionality of the Elecrow ESP32 Display-2.8 Inch HMI with Touch Screen module. You can customize the code to suit your specific IoT application requirements.