Back to Blog
How-to Guides 2026-11-20 Kunkune 0 views

2.4 Inch TFT LCD Shield Wiring and First Display

2.4 Inch TFT LCD Shield Wiring and First Display

Learn how to wire and program the 2.4 inch 240×320 ILI9341 TFT LCD shield with resistive touch for Arduino and ESP32. Step-by-step guide with library setup and calibration tips.

What This 2.4 Inch TFT LCD Shield Gives You

The 2.4 Inch Touch Screen 240×320 LCD TFT ILI9341 Display combines a colour TFT screen and a resistive touch panel on a single board. It uses the ILI9341 driver for the display and an XPT2046 controller for touch, both communicating over SPI with separate chip-select lines. This makes it a compact choice for Arduino and ESP32 projects that need a graphical user interface — think interactive menus, temperature controllers, smart home panels, or handheld game consoles.

Before you wire anything, check the logic voltage. The shield operates at 3.3V logic. You can connect it directly to an ESP32 or ESP8266. For a 5V Arduino Uno, you need a level shifter on the SPI lines. The supplied specifications confirm this requirement.

Key Specifications That Affect Your Wiring

Wiring the Shield to an Arduino Uno (with Level Shifter)

Because the Uno runs at 5V logic and the shield at 3.3V, you must level-shift the SPI lines. Use a 4-channel bi-directional level shifter module. Connect the Uno's 5V to the shifter's HV side and the shield's 3.3V to the LV side. Wire the SPI lines through the shifter. The following connections assume you have a level shifter in place.

  1. Display SPI connections: Uno 13 (SCK) → level shifter → shield SCK; Uno 11 (MOSI) → level shifter → shield MOSI. MISO is not used by the display but may be needed for the SD card slot if you use it.
  2. Display control lines: Uno digital pin 10 → level shifter → shield CS (display chip select). Uno digital pin 9 → level shifter → shield DC (data/command). Uno digital pin 8 → level shifter → shield RST (reset).
  3. Touch chip select: Uno digital pin 7 → level shifter → shield T_CS (touch chip select).
  4. Power: Shield VCC → 3.3V (from Uno's 3.3V output or from the level shifter LV side). Shield GND → Uno GND.

Direct Wiring for ESP32

The ESP32 operates at 3.3V logic, so no level shifter is needed. You can connect the shield directly. Use the following pins (VSPI by default):

  1. Display SPI connections: ESP32 GPIO 18 (SCK) → shield SCK; GPIO 23 (MOSI) → shield MOSI.
  2. Display control lines: ESP32 GPIO 5 → shield CS; GPIO 19 → shield DC; GPIO 4 → shield RST.
  3. Touch chip select: ESP32 GPIO 2 → shield T_CS.
  4. Power: Shield VCC → ESP32 3.3V; shield GND → ESP32 GND.

Library Setup and First Sketch

For Arduino, the Adafruit ILI9341 library handles the display, and the XPT2046_Touchscreen library by Paul Stoffregen handles touch. Both are available through the Arduino Library Manager. For ESP32, Bodmer's TFT_eSPI library is faster and supports both display and touch in a single library.

After installing the library for your platform, load one of the example sketches (e.g., "graphictest" for Adafruit or "TFT_Clock" for TFT_eSPI). Modify the pin definitions to match your wiring. Upload the sketch. If the display lights up but shows nothing, check that the CS and DC pins are correct and that the level shifter (if used) is wired properly.

Calibrating the Resistive Touch

Resistive touch requires calibration to map raw XY values to screen coordinates. The TFT_eSPI library includes calibration sketches that generate offset values you store in your code. After calibration, tap accuracy is within 2–3 mm — sufficient for buttons and menus, not precise enough for handwriting. The supplied evidence confirms this accuracy range.

To calibrate, run the calibration example sketch, touch the marked points on the screen, and note the generated values. Insert them into your main sketch's touch setup. Without calibration, touch coordinates will be misaligned with the display.

What the Supplied Information Does Not Cover

The catalog does not include a wiring diagram, pinout table, or detailed library setup instructions beyond the library names. You will need to refer to the library documentation for advanced features like SD card access (the shield has a micro SD slot on the same SPI bus with a dedicated CS) or touch gestures. The 60-day return policy applies if the shield is defective, but setup issues are not covered by returns.

The shield is best for interactive UI menus, temperature controller touch interfaces, smart home control panels, data logging screens with touch navigation, handheld game consoles, and any project needing a colour touchscreen in a compact form.

Related Articles

Customer Service
Home
Products
Cart
Profile