#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(0);
tft.fillScreen(ILI9341_BLACK);
tft.fillRect(0, 0, 240, 30, ILI9341_NAVY);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.setCursor(25, 6);
tft.print("Panel de control");
tft.setCursor(0, 35);
tft.print("Zona: 1");
tft.setCursor(0, 55);
tft.print("Temperatura Humedad");
tft.drawLine(0, 170, 240, 170, ILI9341_RED);
tft.setCursor(0, 185);
tft.print("Zona: 2");
tft.setCursor(0, 205);
tft.print("Temperatura Humedad");
}
void loop() {
tft.setTextColor(ILI9341_YELLOW, ILI9341_BLACK);
tft.setTextSize(6);
tft.setCursor(30, 90);
tft.print("25");
tft.setCursor(150, 90);
tft.print("64");
tft.setCursor(30, 240);
tft.print("23");
tft.setCursor(150, 240);
tft.print("61");
delay(1000);
}