#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
// Define TFT pins
#define TFT_CS 15
#define TFT_DC 2
#define TFT_RST 4
// Create TFT display instance
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
void setup() {
tft.begin(); // Initialize the display
tft.setRotation(0); // Set display orientation (0-3)
tft.fillScreen(ILI9341_BLACK); // Clear screen with black color
// Draw text
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(4);
}
void loop()
{
tft.setCursor(100,100);
tft.print(analogRead(25));
delay(200);
tft.fillScreen(ILI9341_BLACK);
}