/*
Simple "Hello World" for ILI9341 LCD
https://wokwi.com/arduino/projects/308024602434470466
*/
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#define TFT_DC 9
#define TFT_CS 10
Adafruit_ILI9341 ECRAN = Adafruit_ILI9341(TFT_CS, TFT_DC);
#define NOIR 0x0000
#define BLEU 0x001F
#define ROUGE 0xF800
#define VERT 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define JAUNE 0xFFE0
#define BLANC 0xFFFF
void setup() {
ECRAN.begin();
ECRAN.setRotation(1);
ECRAN.fillRect(0,0,500,500,VERT);
ECRAN.fillRect(0,0,500,150,CYAN);
//nuage
ECRAN.fillRect(100,50,100,30,BLANC);
ECRAN.fillRect(130,30,50,20,BLANC);
//arbre
ECRAN.fillRect(20,100,40,80,MAGENTA);
ECRAN.fillRect(0,50,80,50,NOIR);
ECRAN.fillRect(5,55,70,40,VERT);
ECRAN.fillRect(20,30,40,70,NOIR);
ECRAN.fillRect(25,40,30,70,VERT);
ECRAN.fillRect(10,75,60,20,VERT);
ECRAN.fillRect(20,40,5,70,NOIR);
ECRAN.fillRect(55,40,5,70,NOIR);
ECRAN.fillRect(0,70,25,5,NOIR);
ECRAN.fillRect(55,80,20,5,NOIR);
ECRAN.fillRect(25,105,30,5,NOIR);
//éolienne
ECRAN.fillRect(250,70,30,90,NOIR);
ECRAN.fillRect(225,150,80,20,NOIR);
ECRAN.fillRect(220,60,90,15,NOIR);
ECRAN.fillRect(258.5,25,15,30,NOIR);
ECRAN.fillCircle(265,70,20,MAGENTA);
ECRAN.fillCircle(265,70,10,NOIR);
//STI2D
delay(2000);
ECRAN.fillCircle(150,120,50,NOIR);
delay(200);
ECRAN.fillRect(115,115,5,20,VERT);
delay(200);
ECRAN.fillRect(115,115,5,20,NOIR);
delay(200);
ECRAN.fillRect(115,115,5,20,VERT);
delay(200);
ECRAN.fillRect(115,115,5,20,NOIR);
delay(200);
ECRAN.fillRect(115,115,5,20,VERT);
delay(200);
ECRAN.fillRect(115,115,5,20,NOIR);
delay(200);
ECRAN.setCursor(112, 115);
ECRAN.setTextColor(ILI9341_GREEN);
ECRAN.setTextSize(3);
ECRAN.println("S");
delay(200);
ECRAN.fillRect(128,115,5,20,VERT);
delay(200);
ECRAN.fillRect(128,115,5,20,NOIR);
delay(200);
ECRAN.fillRect(128,115,5,20,VERT);
delay(200);
ECRAN.fillRect(128,115,5,20,NOIR);
delay(200);
ECRAN.fillRect(128,115,5,20,VERT);
delay(200);
ECRAN.fillRect(128,115,5,20,NOIR);
delay(200);
ECRAN.setCursor(112, 115);
ECRAN.setTextColor(ILI9341_GREEN);
ECRAN.setTextSize(3);
ECRAN.println(" T");
delay(200);
ECRAN.fillRect(144,115,5,20,VERT);
delay(200);
ECRAN.fillRect(144,115,5,20,NOIR);
delay(200);
ECRAN.fillRect(144,115,5,20,VERT);
delay(200);
ECRAN.fillRect(144,115,5,20,NOIR);
delay(200);
ECRAN.fillRect(144,115,5,20,VERT);
delay(200);
ECRAN.fillRect(144,115,5,20,NOIR);
ECRAN.setCursor(112, 115);
ECRAN.setTextColor(ILI9341_GREEN);
ECRAN.setTextSize(3);
ECRAN.println(" I");
delay(200);
ECRAN.fillRect(159,115,5,20,VERT);
delay(200);
ECRAN.fillRect(159,115,5,20,NOIR);
delay(200);
ECRAN.fillRect(159,115,5,20,VERT);
delay(200);
ECRAN.fillRect(159,115,5,20,NOIR);
delay(200);
ECRAN.fillRect(159,115,5,20,VERT);
delay(200);
ECRAN.fillRect(159,115,5,20,NOIR);
ECRAN.setCursor(112, 115);
ECRAN.setTextColor(ILI9341_GREEN);
ECRAN.setTextSize(3);
ECRAN.println(" 2");
delay(200);
ECRAN.fillRect(180,115,5,20,VERT);
delay(200);
ECRAN.fillRect(180,115,5,20,NOIR);
delay(200);
ECRAN.fillRect(180,115,5,20,VERT);
delay(200);
ECRAN.fillRect(180,115,5,20,NOIR);
delay(200);
ECRAN.fillRect(180,115,5,20,VERT);
delay(200);
ECRAN.fillRect(180,115,5,20,NOIR);
ECRAN.setCursor(112, 115);
ECRAN.setTextColor(ILI9341_GREEN);
ECRAN.setTextSize(3);
ECRAN.println(" D");
//position en x, hauteur, longX, longY
// Meme reference: https://english.stackexchange.com/questions/20356/origin-of-i-can-haz
}
void loop() {}