#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);
void setup() {
tft.begin();
tft.begin(); // inicializa pantalla
tft.setRotation(0); // establece posicion vertical con pines hacia abajo
tft.fillScreen(ILI9341_BLACK); // fondo de pantalla de color negro
tft.fillRect(0, 0, 240, 30, ILI9341_NAVY); // rectangulo azul naval a modo de fondo de titulo
tft.setTextColor(ILI9341_WHITE); // color de texto en blanco
tft.setTextSize(2); // escala de texto en 2
tft.setCursor(25,6); // ubica cursor
tft.print("Panel de control"); // imprime texto
tft.setCursor(24, 50);
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(2);
tft.println("GRADOS DEL SERVO:");
tft.setCursor(50, 150);
tft.setTextColor(ILI9341_YELLOW);
tft.setTextSize(8);
tft.println("180");
}
void loop() { delay(10); }