1. Introduction
This manual provides instructions for setting up and programming the ESP32 LCD TFT Module. The module is available in 2.4, 2.8, and 3.5-inch variants, featuring an IPS resistive touch display. It integrates the ESP32 WiFi and Bluetooth chip, a dual-core 32-bit MCU with WiFi HT40 and Bluetooth/BLE 4.2 technology. The high-performance dual-core Tensilica LX6 MCU operates at 240 MHz, offering 600 DMIPS computing power, making it suitable for various standalone application developments.

2. Setup Guide
2.1. Installing Arduino IDE
To begin programming the ESP32 module, you will need the Arduino IDE. It is recommended to install version 1.8.19 or greater. You can download the installer from the official Arduino website. For Windows, a direct download link for version 1.8.19 is: https://downloads.arduino.cc/arduino-1.8.19-windows.exe
2.2. Adding ESP32 Boards to Arduino IDE
- Open the Arduino IDE.
- Click on the File menu in the top menu bar.
- Select Preferences to open the Preferences dialog box.
- In the Preferences dialog, locate the textbox labeled Additional Boards Manager URLs.
- Paste the following link into the textbox. If there is existing text, add a comma before pasting:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - Click OK to save the settings.
- Go to the Tools menu, then Board:, and select Boards Manager.
- In the Boards Manager search box, type
esp32. - Locate the entry for esp32 by Espressif Systems and click Install.
- Once installed, go to Tools > Board: and select ESP32 Dev Module.
- Under Tools > Programmer, select esptool.



2.3. Installing TFT_eSPI Library
The examples provided for this module are based on the TFT_eSPI library, which supports various display driver chips (e.g., ST7735, ST7789, ILI9341, ILI9486, ILI9488). To install:
- In Arduino IDE, go to Sketch > Include Library > Manage Libraries...
- In the Library Manager, search for
TFT_eSPIand click Install.

2.4. Configuring TFT_eSPI (User_Setup.h)
After installation, the TFT_eSPI library requires configuration specific to your screen type and driver chip. This involves modifying the User_Setup.h file within the library directory. The library location is typically C:\Users\<username>\Documents\Arduino\libraries\TFT_eSPI.
- Navigate to the TFT_eSPI library folder.
- Open
User_Setup.h. - Step 1: Modify the custom driver file. Comment out unused driver files and uncomment the one that matches your screen (e.g., ILI9341 for 2.8-inch).
- Step 2: Set width and height. Define
TFT_WIDTHandTFT_HEIGHTaccording to your display's resolution (e.g., 240x320 for 2.8-inch). - Step 3: Pin definition. Define your specific pins for MISO, MOSI, SCLK, CS, DC, RST, and TOUCH_CS/IRQ. For example, for ILI9488 320x480 display with XPT2046 touch: TFT_MISO = 12, TFT_MOSI = 13, TFT_SCLK = 14, TFT_CS = 15, TFT_DC = 2, TFT_RST = 27, TOUCH_CS = GPIO33, TOUCH_IRQ = GPIO36.
- Step 4: Turn on Backlight Pins. Define
TFT_BLandTFT_BACKLIGHT_ON_HIGHas needed.

2.5. Copying lv_conf.h
If you are using LVGL, ensure the lv_conf.h file is placed in the root directory of the TFT_eSPI library.

3. Operating Instructions
3.1. First Program Example
After setting up the Arduino IDE and libraries, you can upload your first program. A simple example to test the setup is to print "hello from ESP32" to the Serial port every second. Remember to reset the power of the device after uploading a new program to ensure it enters flashing mode again.
3.2. Basic Display Settings
The TFT_eSPI library provides functions for basic display control:
tft.init();: Initializes the screen.tft.fillScreen(TFT_BLACK);: Fills the entire screen with a specified color (e.g., black).void setRotation(uint8_t r);: Sets the screen rotation angle (0, 1, 2, or 3 for 0°, 90°, 180°, 270°).tft.invertDisplay(bool i);: Inverts display colors (true for invert, false for normal).
3.3. Text Related API
Functions for displaying text on the screen:
void setCursor(int16_t x, int16_t y, uint8_t font);: Sets the text display coordinates and font.void setTextColor(uint16_t fgcolor, uint16_t bgcolor);: Sets foreground and background text colors.void setTextSize(uint8_t size);: Sets text size (1 to 7).tft.print("Hello World!");: Prints text to the screen.int16_t drawString(const String &string, int32_t x, int32_t y, uint8_t font);: Draws a string (left-aligned).int16_t drawCentreString(const char * string, int32_t x, int32_t y, uint8_t font);: Draws a string (centered).int16_t drawRightString(const char * string, int32_t x, int32_t y, uint8_t font);: Draws a string (right-aligned).int16_t drawChar(uint16_t uniCode, int32_t x, int32_t y, uint8_t font);: Draws a single character.
3.4. Drawing Geometric Figures
The library supports drawing various shapes:
void drawPixel(int32_t x, int32_t y, uint32_t color);: Draws a single pixel.void drawLine(int32_t xs, int32_t ys, int32_t xe, int32_t ye, uint32_t color);: Draws a line.void drawFastHLine(int32_t x, int32_t y, int32_t w, uint32_t color);: Draws a horizontal line.void drawCircle(int32_t x, int32_t y, int32_t r, uint32_t color);: Draws a hollow circle.void fillCircle(int32_t x, int32_t y, int32_t r, uint32_t color);: Draws a filled circle.void drawRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color);: Draws a hollow rectangle.void fillRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color);: Draws a filled rectangle.void drawTriangle(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x3, int32_t y3, uint32_t color);: Draws a hollow triangle.void fillTriangle(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x3, int32_t y3, uint32_t color);: Draws a filled triangle.
3.5. Image Display Related
Functions for displaying images:
void drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t fgcolor, uint16_t bgcolor);: Displays a BMP picture.void drawXBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t fgcolor, uint16_t bgcolor);: Displays an XBM (X BitMap) image.void pushImage(int32_t x, int32_t y, int32_t w, int32_t h, const uint16_t *data, uint16_t transparent);: Pushes image data to the display, with optional transparency.


4. Maintenance
To ensure the longevity and optimal performance of your ESP32 LCD TFT Module, keep it clean and dry. Avoid exposing it to extreme temperatures, humidity, or direct sunlight. Handle the module with care to prevent physical damage to the screen or components.
5. Troubleshooting
- Upload Issues: If a new program fails to upload, ensure you reset the power of the device to enter flashing mode.
- No Output on Serial Console: If you don't see expected output, check your serial monitor settings (baud rate) and ensure your code is correctly initializing the serial port.
- Setup Difficulties: The initial setup, especially pin identification and library configuration, can be challenging. Refer to the detailed steps in the Setup Guide and ensure all pins are correctly defined in
User_Setup.h. - Touch Screen Unresponsive: If the touch functionality is intermittent or fails, verify the touch controller pin definitions (e.g., TOUCH_CS, TOUCH_IRQ for XPT2046) and check for any software loops that might interfere.
- Firmware Compatibility (3.5-inch): Some users have reported that not all firmware works seamlessly with the 3.5-inch screen. Ensure you are using firmware and libraries compatible with the specific driver chip of your 3.5-inch module.
- Incorrect Display/Colors: Verify the display driver chip (e.g., ILI9486 for 2.8-inch, ILI9488 for 3.5-inch) and ensure it is correctly selected in
User_Setup.h.
6. Specifications
| Feature | Description |
|---|---|
| Brand Name | AITEWIN ROBOT |
| Model Number | 2.8inch LCD TFT Module ESP32 Arduino LVGL |
| Display Sizes | 2.4 inch, 2.8 inch, 3.5 inch |
| Display Mode | IPS Resistive Touch |
| Resolution | 320*240 (common, specific to model variant) |
| Main Chip | ESP32 (Dual-core 32-bit MCU, Tensilica LX6) |
| Connectivity | WiFi HT40, Bluetooth/BLE 4.2 |
| CPU Frequency | 240 MHz |
| Computing Power | 600 DMIPS |
| Supported Drivers | ST7735, ST7789, ILI9341, ILI9486, ILI9488 (depending on model) |
| Touch Controller | XPT2046 (common) |
| Origin | Mainland China |
| Package Dimensions | 16cm (L) x 14cm (W) x 3cm (H) |
| Package Weight | 0.088 kg |



7. User Tips
- Viewing Angles: Be aware that color fidelity can be angle-dependent. For example, some colors might appear different when viewed from the side, especially near the USB-C connector.
- Pinout Clarity: The setup process can be complex due to varying pin identifications. Double-check all pin connections and configurations in the
User_Setup.hfile. - Firmware for 3.5-inch: If you are using the 3.5-inch version, note that some firmware might not be fully compatible. Experiment with different firmware versions or consult community resources for specific recommendations.
- Creative Applications: These modules are versatile for projects like displaying images in a Lego city, creating custom dashboards, or developing interactive interfaces.
- Seller Support: If you encounter programming difficulties, the seller may provide additional guidance.
8. Frequently Asked Questions (FAQ)
- Q: Is the Marauder software available for 3.5 inches?
- A: Compatibility with specific third-party software like Marauder for the 3.5-inch display may vary. Please check the software's documentation or community forums for support for this specific display size.
- Q: What resolution does the 3.5-inch display have?
- A: The resolution for the 3.5-inch display is typically 320x480 pixels, though it's always best to confirm with the specific product variant's specifications or by checking the display driver chip (e.g., ILI9488).
- Q: Is it available without the ESP32 module?
- A: This product is sold as an integrated module with the ESP32. Individual display panels without the ESP32 module may be available from other suppliers, but this specific product includes the ESP32.
- Q: Which kind of connector do we need to connect a speaker, microphone, or sensor?
- A: The module provides various GPIO resources from the ESP32 chip. You would typically use standard jumper wires or custom PCBs to connect external components like speakers, microphones, or sensors to the available GPIO pins. Refer to the ESP32 pinout documentation for details on specific pin functions (e.g., I2S for audio, ADC for analog sensors).
9. Warranty and Support
For warranty information, technical support, or any product-related inquiries, please contact the seller directly through the platform where you purchased the module. They can provide assistance with specific issues, returns, or replacements according to their policies.
A PDF version of the user manual is also available for download: User Manual (PDF)