This commit is contained in:
2026-02-15 16:36:28 -08:00
parent 5e8b5410e5
commit 69800016c4
4 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#include <TFT_eSPI.h>
#include <SPI.h>
TFT_eSPI tft = TFT_eSPI();
void setup() {
Serial.begin(115200);
tft.init();
tft.setRotation(1); // Landscape
tft.fillScreen(TFT_BLACK);
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.setTextSize(2);
tft.drawString("Hello from ESP32!", 20, 20);
tft.fillCircle(160, 120, 50, TFT_BLUE);
Serial.println("Display initialized!");
}
void loop() {
// Touch test
uint16_t x, y;
if (tft.getTouch(&x, &y)) {
Serial.printf("Touch at: %d, %d\n", x, y);
tft.fillCircle(x, y, 3, TFT_RED);
}
}