#include <Adafruit_ILI9341.h>
#include <Adafruit_GFX.h>
// Pin connections for Arduino Uno
#define TFT_CLK 13
#define TFT_MISO 12
#define TFT_MOSI 11
#define TFT_CS 10
#define TFT_DC 9
#define TFT_RST 8
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CLK, TFT_MISO, TFT_MOSI, TFT_CS, TFT_DC, TFT_RST);
void setup() {
tft.begin();
tft.setRotation(3); // Adjust the screen rotation if needed (0, 1, 2, or 3)
tft.fillScreen(ILI9341_BLACK);
}
void loop() {
// Clear the screen
tft.fillScreen(ILI9341_BLACK);
// Display text
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.setCursor(10, 10);
tft.println("Hello, World!");
// Draw a shape (rectangle)
//tft.drawRect(50, 50, 100, 80, ILI9341_YELLOW);
// Draw a line
// tft.drawLine(20, 100, 220, 200, ILI9341_RED);
// Display an image
// tft.drawBitmap(120, 120, image_data, image_width, image_height, ILI9341_WHITE);
delay(1000); // Delay for 1 second
}