Stufin
Home Quick Cart Profile

Elecrow ESP32 Display-2.8 Inch HMI with Touch Screen - High Resolution, WiFi, Bluetooth, LVGL Support With Acrylic Case

Buy Now on Stufin

Display Specifications

+ Display Type2.8-inch TFT LCD
+ Resolution320x240 pixels
+ Touch ScreenResistive
ESP32 Microcontroller
+ ProcessorDual-core Xtensa LX6
+ Clock SpeedUp to 240 MHz
+ RAM520 KB
+ Flash4 MB
Wi-Fi and Bluetooth
+ Wi-Fi2.4 GHz
+ Bluetooth4.2

Peripherals

+ UART

+ SPI

+ I2C

+ I2S

+ ADC

+ DAC

Power Supply

+ Operating Voltage3.3V
+ Power Consumption< 1W

Dimensions

+ Module Size65x55 mm
+ Acrylic Case Size76x66 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.

Pin Configuration

  • Elecrow ESP32 Display-2.8 Inch HMI with Touch Screen - High Resolution, WiFi, Bluetooth, LVGL Support With Acrylic Case
  • Pinout Description
  • The Elecrow ESP32 Display module features a 2.8-inch high-resolution touchscreen display, integrated with an ESP32 microcontroller, Wi-Fi, Bluetooth, and LVGL support. The module has a 40-pin interface, which allows for easy connection to various peripherals and sensors. Here's a detailed description of each pin:
  • Power Pins
  • VIN (Pin 1): Input voltage pin, accepts a voltage range of 3.3V to 5V.
  • GND (Pin 2, 20, 38, and 40): Ground pins, connected to the negative terminal of the power source.
  • ESP32 Microcontroller Pins
  • GPIO0 (Pin 3): General-purpose input/output pin, can be used as an input or output.
  • GPIO1 (Pin 4): General-purpose input/output pin, can be used as an input or output.
  • GPIO2 (Pin 5): General-purpose input/output pin, can be used as an input or output.
  • GPIO3 (Pin 6): General-purpose input/output pin, can be used as an input or output.
  • GPIO4 (Pin 7): General-purpose input/output pin, can be used as an input or output.
  • GPIO5 (Pin 8): General-purpose input/output pin, can be used as an input or output.
  • Touch Screen Pins
  • T_IRQ (Pin 9): Touch screen interrupt pin, used to trigger interrupts when a touch event occurs.
  • T_CLK (Pin 10): Touch screen clock pin, used to clock the touch screen controller.
  • T_CS (Pin 11): Touch screen chip select pin, used to select the touch screen controller.
  • T_MOSI (Pin 12): Touch screen master out slave in pin, used to transmit data to the touch screen controller.
  • T_MISO (Pin 13): Touch screen master in slave out pin, used to receive data from the touch screen controller.
  • Display Pins
  • D0 (Pin 14): Display data pin 0, used to transmit data to the display controller.
  • D1 (Pin 15): Display data pin 1, used to transmit data to the display controller.
  • D2 (Pin 16): Display data pin 2, used to transmit data to the display controller.
  • D3 (Pin 17): Display data pin 3, used to transmit data to the display controller.
  • D4 (Pin 18): Display data pin 4, used to transmit data to the display controller.
  • D5 (Pin 19): Display data pin 5, used to transmit data to the display controller.
  • D6 (Pin 21): Display data pin 6, used to transmit data to the display controller.
  • D7 (Pin 22): Display data pin 7, used to transmit data to the display controller.
  • WR (Pin 23): Display write pin, used to latch data into the display controller.
  • RD (Pin 24): Display read pin, used to read data from the display controller.
  • RS (Pin 25): Display register select pin, used to select the register to be written to or read from.
  • Additional Pins
  • EN (Pin 26): Enable pin, used to enable the display controller.
  • RST (Pin 27): Reset pin, used to reset the ESP32 microcontroller.
  • XTAL (Pin 28 and 29): Crystal oscillator pins, used to connect a 40MHz crystal oscillator for the ESP32 microcontroller.
  • Connecting the Pins
  • To connect the Elecrow ESP32 Display module to external peripherals or sensors, follow these steps:
  • 1. Power Connection: Connect the VIN pin (Pin 1) to a 3.3V to 5V power source. Connect one of the GND pins (Pin 2, 20, 38, or 40) to the negative terminal of the power source.
  • 2. ESP32 Microcontroller Connections: Connect the GPIO pins (Pin 3 to 8) to external peripherals or sensors as needed, taking care not to exceed the maximum current rating of the pin (20mA).
  • 3. Touch Screen Connections: Connect the T_IRQ pin (Pin 9) to an external interrupt handler. Connect the T_CLK pin (Pin 10), T_CS pin (Pin 11), T_MOSI pin (Pin 12), and T_MISO pin (Pin 13) to a touch screen controller or a microcontroller with touch screen capabilities.
  • 4. Display Connections: Connect the D0 to D7 pins (Pin 14 to 22) to a display controller or an LCD display. Connect the WR pin (Pin 23), RD pin (Pin 24), and RS pin (Pin 25) to the display controller.
  • 5. Additional Connections: Connect the EN pin (Pin 26) to a logic high level to enable the display controller. Connect the RST pin (Pin 27) to a reset button or a logic low level to reset the ESP32 microcontroller. Connect the XTAL pins (Pin 28 and 29) to a 40MHz crystal oscillator.
  • Remember to consult the datasheet for the specific peripheral or sensor you are connecting to ensure correct pinout and voltage levels.

Code Examples

Elecrow ESP32 Display-2.8 Inch HMI with Touch Screen Documentation
Overview
The 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 Specifications
Microcontroller: 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 Support
The 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 LVGL
This 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 LVGL
This 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.