#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
// Pin definitions
#define TFT_CS 10
#define TFT_RST 9
#define TFT_DC 8
#define TFT_MOSI 11 // Connect to MOSI
#define TFT_SCK 13 // Connect to SCK
#define TFT_LED 5 // Backlight control
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
void setup() {
tft.begin();
pinMode(TFT_LED, OUTPUT); // Set LED pin as output
digitalWrite(TFT_LED, HIGH); // Turn on the backlight
// Set display properties
tft.setRotation(1);
tft.fillScreen(ILI9341_BLACK);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.setCursor(50, 50);
tft.println("Hello World");
}
void loop() {
}