Skip to main content

wokwi-ili9341 Reference

Full color 240x320 2.8" LCD-TFT display with SPI interface

Pin names#

NameDescriptionArduino Uno pin
VCCSupply voltage5V
CSChip select10†
D/CData/command pin9†
MOSISPI data (MCU → LCD)11
SCKSPI clock13
LEDBacklight LED*5V
MISOSPI data (LCD → MCU)‡12

* The RST and backlight (LED) pins are not available in the simulation.
† You connect CS and D/C to any digital Arduino pin. The pin numbers here are just an example.
‡ You can leave MISO disconnected, unless you need to read data back from the LCD.

Using in Arduino#

You can use the Adafruit_ILI9341 library or the lcdgfx library to interface with the LCD display. The following code example shows basic usage with Adafruit_ILI9341. It works with the pin connections from the table above:

#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#define TFT_DC 9
#define TFT_CS 10
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
tft.setCursor(26, 120);
tft.println("Hello, TFT!");
tft.setCursor(20, 160);
tft.println("I can has colors?");
void loop() { }

Run this example on Wokwi

Simulator examples#