#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
// Display Pins
#define TFT_CS 15
#define TFT_DC 2
#define TFT_MOSI 13
#define TFT_MISO 12
#define TFT_SCK 14
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
Serial.begin(115200);
// Init TFT
SPI.begin(TFT_SCK, TFT_MISO, TFT_MOSI, TFT_CS);
tft.begin();
tft.fillScreen(ILI9341_BLACK);
tft.setRotation(1); // Landscape orientation
}
void loop() {
// Array of war quotes
const char* quotes[] = {
"War is peace.\nFreedom is slavery.\nIgnorance is strength. - Orwell",
"Only the dead have seen the end of war. - Plato",
"In war, truth is the first casualty. - Aeschylus",
"Older men declare war,\nbut it is youth that must fight and die. - Hoover"
};
// Display each quote for 10 seconds
for (int i = 0; i < 4; i++) {
tft.fillScreen(ILI9341_BLACK);
tft.setTextColor(ILI9341_YELLOW);
tft.setTextSize(2);
tft.setCursor(10, 40);
tft.println(quotes[i]);
delay(10000); // Show each quote for 10 seconds
}
// After quotes, show signature
tft.fillScreen(ILI9341_BLACK);
tft.setTextColor(ILI9341_CYAN);
tft.setTextSize(2);
tft.setCursor(40, tft.height()/2);
tft.println("Code by Arvind");
delay(10000); // Show signature for 10 seconds
}
Loading
esp32-2432s028r
esp32-2432s028r