#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include "SPI.h"
#define TFT_CS 15 // Double check this
#define TFT_DC 2
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
Serial.begin(9600);
Serial.println("Initializing TFT...");
tft.begin();
tft.setRotation(0); // Landscape
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(50, 100);
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(2);
tft.println("Hello, TFT!");
delay(3000);
tft.fillScreen(ILI9341_BLUE);
tft.setCursor(20, 150);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(3);
tft.println("Welcome!");
}
void loop() {
tft.setLocation(1);
tft.fillScreen(ILI9341_BLUE);
tft.setCursor(20, 150);
tft.setTextColor(ILI9341_BLACK);
tft.setTextSize(3);
tft.println("Welcome!");
delay(5000);
}