#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>

// Pin definitions (change if necessary)
#define TFT_CS     10  // Chip select pin
#define TFT_DC     9   // Data/Command pin (based on your setup)

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

void setup() {
  Serial.begin(9600);
  
  // Initialize TFT display
  tft.begin();
  
  // Set the rotation of the screen (optional, adjust if needed)
  tft.setRotation(3);  // 0, 1, 2, or 3 (try different rotations)

  // Clear the screen and fill it with black
  tft.fillScreen(ILI9341_BLACK);

  // Set the text color and size
  tft.setTextColor(ILI9341_RED);  // Set text color to red
  tft.setTextSize(3);  // Text size (1 is default, 2 is larger)

  // Set the cursor position for the text (centered both horizontally and vertically)
  tft.setCursor(0, 60);  

  // Print text to the screen
  tft.print("DONNEES DISPARUES");
  tft.setCursor(0, 90); 
  tft.print(" / DERNIER");
  tft.setCursor(0, 120); 
  tft.print("TELECHARGEMENT :");
  tft.setCursor(0, 150); 
  tft.print("PR. DIANKA");
}

void loop() {
  // Nothing needed in loop for this example
}
