TPL-08Templates/ILI9341 TFT Display
ILI9341 TFT Display
240×320 colour TFT display over SPI. Draws a red rectangle, cyan circle, and white text using the Adafruit ILI9341 library. Runs on 3.3V logic — add level shifters on real 5V hardware.
Open in Playgroundintermediate · TFT · SPI · display · ILI9341 · colour
FIG. 1ILI9341 TFT Display · circuitTPL-08
02Sketch
sketch.inoArduino C++
24 lines
// ILI9341 TFT — draws coloured shapes
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include <SPI.h>
#define TFT_CS 10
#define TFT_RST 9
#define TFT_DC 8
Adafruit_ILI9341 tft(TFT_CS, TFT_DC, TFT_RST);
void setup() {
tft.begin();
tft.setRotation(1); // landscape
tft.fillScreen(ILI9341_BLACK);
tft.fillRect(10, 10, 100, 60, ILI9341_RED);
tft.fillCircle(200, 100, 40, ILI9341_CYAN);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.setCursor(20, 90);
tft.print("ILI9341!");
}
void loop() {}03Components
- 01Arduino Uno
- 02ILI9341 TFT Display (wokwi-ili9341)
04Wiring
| Component pin | Arduino pin |
|---|---|
| VCC | 3.3V |
| GND | GND |
| CS (Chip Select) | Pin 10 |
| RST (Reset) | Pin 9 |
| D/C (Data/Command) | Pin 8 |
| MOSI | Pin 11 (MOSI) |
| SCK | Pin 13 (SCK) |
| MISO | Pin 12 (MISO) |
| LED (Backlight) | 3.3V (via 100 Ω in real HW) |
Ready when you are
Have a circuit in mind?
No hardware, no installs — a browser is enough.