#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#define TFT_CS 5
#define TFT_RST 17
#define TFT_DC 16
#define TFT_MOSI 23
#define TFT_CLK 18
#define MISO -1
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
void setup() {
Serial.begin(115200);
tft.begin();
tft.setRotation(0);
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(20, 20);
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(2);
tft.print("Hello, ESP32!");
tft.fillRect(50, 50, 100, 50, ILI9341_RED);
}
void loop() {
}