#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#define TFT_CS 15 // Chip select pin
#define TFT_RESET 4 // Reset pin
#define TFT_DC 2 // Data/Command pin
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RESET);
void setup() {
// Initialize the display
tft.begin();
tft.setRotation(1); // Set rotation if necessary
tft.fillScreen(ILI9341_BLACK); // Clear the screen
// Set text color and size
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
// Print some text
tft.setCursor(10, 10);
tft.println("Hello, SPI Display!");
}
void loop() {
}