#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#define TFT_CS 10
#define TFT_RST 7
#define TFT_DC 6
Adafruit_ILI9341 TFT = Adafruit_ILI9341 (TFT_CS, TFT_DC, TFT_RST);
void setup() {
TFT.begin();
TFT.setRotation(0);
TFT.fillScreen(ILI9341_BLACK);
TFT.setTextColor(ILI9341_WHITE);
drawSquareWithText();
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
void drawSquareWithText() {
int x = 40;
int y = 60;
int xl = 160;
int yl = 140;
TFT.fillRect(x,y,xl,yl, ILI9341_BLUE);
TFT.setCursor(x+38,y+50);
TFT.setColor(ILI9341_WHITE);
TFT.setTextSize(3);
TFT.print("Start");
TFT.setCursor(x+26,y+85);
TFT.setTextSize(2);
TFT.print("Pritisni 1");
}