#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#define TFT_DC 2
#define TFT_CS 5
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
tft.begin();
tft.setCursor(0,50);
tft.setRotation(1);
tft.setTextColor(ILI9341_RED);
tft.setTextSize(3);
tft.println("21h Go");
tft.setCursor(0, 100);
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(3);
tft.println("Buteco");
}
void loop() {
int Dados = analogRead(34);
tft.setCursor(0, 150);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(4);
tft.println(Dados);
delay(1000);
tft.fillRect(0,150,140,70,ILI9341_BLACK);
}Loading
esp32-devkit-c-v4
esp32-devkit-c-v4