#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#define TFT_DC 2
#define TFT_CS 15
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
int bot = 14;
int Tela = 1;
void setup() {
Serial.begin(115200);
pinMode(bot, INPUT);
tft.begin();
tft.setRotation(1); //Sentido do Display 0=Portrait / 1=Landscape
tft.fillScreen(ILI9341_BLACK);
}
void loop() {
int botValue = digitalRead(bot);
if(botValue == true && Tela < 3){
Tela = Tela + 1;
tft.fillScreen(ILI9341_BLACK);
while(botValue == 1){
botValue = digitalRead(bot);
}
}
else if (botValue == true && Tela >= 3){
Tela = 1;
tft.fillScreen(ILI9341_BLACK);
while(botValue == 1){
botValue = digitalRead(bot);
}
}
if (Tela == 1){
tft.setCursor(10, 20);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.println(" Etec Rosa Perrone ");
tft.setCursor(10, 60);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.println(" Pedro Luiz Carvalho ");
tft.setCursor(10, 80);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.println(" Murilo Casa Grande ");
tft.setCursor(60, 120);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(4);
tft.println("3B");
}
else if (Tela == 2){
tft.setCursor(130, 80);
tft.setTextColor(ILI9341_BLACK);
tft.setTextSize(6);
tft.println("T");
tft.fillCircle(120, 100, 35, ILI9341_WHITE);
tft.fillCircle(170, 100, 35, ILI9341_WHITE);
tft.fillCircle(145, 60, 35, ILI9341_WHITE);
tft.fillTriangle(145, 75, 120, 160, 170, 160, ILI9341_WHITE);
}
else if (Tela == 3){
tft.setCursor(10, 80);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.println(" Este eh o Logotipo uma marca de baralhos para truco inspirado no simbolo de Paus.");
}
delay(2000);
}