// Практичне заняття № 10.
/*
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 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
tft.begin();
tft.setRotation(1);
}
void loop() {
tft.setCursor(26, 120);
tft.setTextColor(ILI9341_RED);
tft.setTextSize(3);
tft.println("Hello, OLEGKA!");
delay(500);
tft.setCursor(20, 160);
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(2);
tft.println("I can has colors?");
delay(500);
tft.drawCircle(50,50,20,ILI9341_WHITE);
tft.fillCircle(50,50,15,ILI9341_WHITE);
delay(500);
tft.drawRect(10,10,20,10,ILI9341_BLUE);
tft.fillRect(12,12,15,7,ILI9341_BLUE);
delay(500);
tft.drawLine(20,50,200,210,ILI9341_MAROON);
delay(500);
tft.fillScreen(ILI9341_YELLOW);
delay(500);
tft.fillScreen(ILI9341_BLACK);
}