กลับหน้าหลัก
views
How to Use ESP32 with ILI9488 3.5" TFT LCD Touch Screen
Last updated on

How to Use ESP32 with ILI9488 3.5" TFT LCD Touch Screen


How to Use ESP32 with ILI9488 3.5” TFT LCD Touch Screen

This guide walks you through wiring and using a 3.5” TFT LCD (480x320) with touch functionality on an ESP32 board using the TFT_eSPI library.

Required Components

  • ESP32 NodeMCU ESP-WROOM-32 board
  • 3.5” ILI9488 TFT LCD 480x320 with touch
  • Micro USB cable for uploading
  • Breadboard and jumper wires
  • 5V 2A power adapter

ESP32 to ILI9488 Wiring

Wiring diagram table showing ESP32 pins connected to ILI9488 - VCC to 3V3, GND to GND, MOSI (SDI) to D23, SCK to D18, CS to D5, RESET to EN, DC/RS to TX2, LED to 3V3, MISO (SDO) marked as optional

Touch Panel Connections

ESP32ILI9488 Touch
D18T_CLK
RX2T_CS
D23T_DIN
D19T_DOUT
-T_IRQ (Not needed)

Note: The MISO (SDO) pin on the display is optional and can be left unconnected.

Installing TFT_eSPI Library

Step 1: Download Library

Download from GitHub: Bodmer/TFT_eSPI or from the MediaFire link provided in the original article.

Step 2: Extract and Place in Libraries Folder

Use WinRAR or WinZip to extract, then copy the TFT_eSPI-master folder to:

This PC > Documents > Arduino > libraries

Step 3: Edit Config File for ILI9488

  1. Open User_Setup_Select.h in the library folder

  2. Scroll to line 22, column 1. You will see #include <User_setup.h>. Add // at the beginning to comment it out.

  3. Scroll to line 47, column 3. You will see //#include <User_setup.h>. Remove the // to uncomment it, leaving only #include <User_setup.h>

Notepad showing User_Setup_Select.h edits - line 22 commented with //, line 47 uncommented
  1. Save and close the file.

Step 4: Configure PIN assignments for ILI9488

  1. Navigate to the User_Setup folder inside the library

  2. Open Setup21_ILI9488.h

  3. Edit the GPIO pin assignments according to your actual wiring

  4. Save and close the file.

Setup21_ILI9488.h code showing SPI and GPIO pin definitions for ILI9488 configuration

Uploading Graphics Test Code

Upload Steps

  1. Open Arduino IDE

  2. Navigate to File > Examples > TFT_eSPI > 480 x 320 > TFT_grapicstest_one_lib

  3. Select the Port connected to your ESP32

  4. Select Board as ESP32 Dev Module

  5. Click Upload (Sketch > Upload)

  6. Wait for Arduino IDE to finish processing

If Upload Gets Stuck

If the upload window is stuck at Connecting... for more than 3 seconds, press and hold the BOOT button on the ESP32 board until the display starts responding.

Once uploaded successfully, you will see completion messages in Arduino IDE and the ILI9488 screen will display various graphics patterns.

Touch Screen Calibration

Calibration Steps

  1. Navigate to File > Examples > TFT_eSPI > Generic > Touch_calibrate

  2. Upload this code to your ESP32 board

  3. Open Serial Monitor and set Baud Rate to 115200

  4. The ILI9488 screen will show 4 arrow targets

  5. Use a touch stylus (recommended over finger) to tap precisely at the tip of each arrow - all 4 points

[image: ILI9488 screen displaying 4 calibration arrow targets at corners - top-left, top-right, bottom-right, bottom-left]

  1. When calibration completes, Serial Monitor will display accuracy values

  2. The screen will then show “Touch screen to test!”

  3. Try touching the screen with the stylus or your finger - dots or lines will appear at the touch positions

If Touch Position is Inaccurate

If the displayed touch position differs significantly from where you actually touched, press the EN button on the ESP32 board to reset, then redo the Touch Calibration process.

Summary

After completing all setup steps, you can use the ILI9488 display for various projects such as:

  • Displaying sensor data
  • Creating UI menus for device control
  • Showing real-time graphs
  • Building games or touch-based applications

Reference Video

https://www.youtube.com/embed/C1wlwQysGz8

อยากทำโปรเจคแบบนี้?

รับทำโปรเจค Arduino / IoT จบงานไว ส่งงานครบ พร้อมสอน

If you need Arduino project service or urgent IoT development, see full service details on the home page

จ้างทำโปรเจคเลย

Project estimate

Want something like this? Open the estimate page.

The long form is now on a separate estimate page, so this article stays clean.

ความคิดเห็น

รีวิวจากคนใช้งานจริง

รีวิวจากลูกค้าและคนที่เคยใช้งาน

ถ้าเคยสั่งงาน เคยอ่านหน้านี้แล้วได้ประโยชน์ หรือมีข้อเสนอแนะ ฝากรีวิวไว้ได้เลย

กำลังโหลดรีวิว...