#include <Arduino_GFX_Library.h>
#define TFT_SCK 18
#define TFT_MOSI 23
#define TFT_MISO 19
#define TFT_CS 22
#define TFT_DC 21
#define TFT_RESET 17
Arduino_ESP32SPI bus = Arduino_ESP32SPI(TFT_DC, TFT_CS, TFT_SCK, TFT_MOSI, TFT_MISO);
Arduino_ILI9341 gfx = Arduino_ILI9341(&bus, TFT_RESET);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
gfx.begin();
gfx.fillScreen(BLACK);
}
void loop() {
// put your main code here, to run repeatedly:
gfx.setCursor(20, 20);
gfx.print("Hello world");
delay(10); // this speeds up the simulation
}