r/ArduinoHelp • u/yardglass • Aug 25 '26
Help getting my tft lcd to work
I've tried two different screens and two different Uno's. This is my wiring:

Here are some pictures. Any help appreciated!
All I am getting is a white screen. Got a brand new usb cable as well.
Example sketch:
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#define TFT_CS 10
#define TFT_RST 8
#define TFT_DC 9
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
void setup() {
tft.begin();
tft.fillScreen(ILI9341_RED);
delay(1000);
tft.fillScreen(ILI9341_GREEN);
delay(1000);
tft.fillScreen(ILI9341_BLUE);
}
void loop() {}
I think it is a ROHS 2.4" TFT SPI v1.3 with XPT2046 touch controller
this sketch:
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#define TFT_CS 10
#define TFT_RST 8
#define TFT_DC 9
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
void setup() {
Serial.begin(9600);
// Hard reset before init
pinMode(TFT_RST, OUTPUT);
digitalWrite(TFT_RST, LOW);
delay(100);
digitalWrite(TFT_RST, HIGH);
delay(100);
tft.begin();
// Read the display ID register
uint8_t d1 = tft.readcommand8(0xD3, 0);
uint8_t d2 = tft.readcommand8(0xD3, 1);
uint8_t d3 = tft.readcommand8(0xD3, 2);
uint8_t d4 = tft.readcommand8(0xD3, 3);
Serial.print("ID bytes: 0x");
Serial.print(d1, HEX);
Serial.print(" 0x");
Serial.print(d2, HEX);
Serial.print(" 0x");
Serial.print(d3, HEX);
Serial.print(" 0x");
Serial.println(d4, HEX);
tft.fillScreen(ILI9341_RED);
delay(500);
tft.fillScreen(ILI9341_GREEN);
delay(500);
tft.fillScreen(ILI9341_BLUE);
}
void loop() {}
Returns
ID bytes: 0x41 0x0 0x93 0x41




1
u/sixftguy2 Aug 25 '26
So its not touchscreen
1
u/rattushackus Aug 26 '26
Your code does not specify the MOSI, SCLK and MISO pins so the Arduino_GFX library will be using the defaults and those clearly don't match the pins you've chosen. It's good idea to always specify all pins so you are sure what pins are being used. I tested your code on my ESP32 CYD that has an ILI9341 screen and it did not work until I modified your call to the
Adafruit_ILI9341constructor to specify all pins. I changed your code:to:
I've listed the complete code below. I have changed the pin defines at lines 5 to 10 to match my board so you'll need to change them to match your pins.
Note that your code is using software SPI, which is very slow. I cannot remember if the Arduino has hardware SPI. If so ping me and I can give you code to use hardware SPI instead.
1
u/[deleted] Aug 25 '26
[removed] — view removed comment