#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.setCursor(5, 1);
tft.setTextColor(ILI9341_BLUE);
tft.setTextSize(3);
tft.println("=============");
tft.setCursor(50, 25);
tft.setTextColor(tft.color565(190, 45, 100));
tft.setTextSize(2);
tft.println("STC & EN Co");
tft.setCursor(5, 50);
tft.setTextColor(ILI9341_PINK);
tft.setTextSize(3);
tft.println("!@#$%¨&*()-=");
}
void loop()
{
for(uint8_t d=1; d<=120; d=d+20)
{
tft.drawCircle(120, 200, d, ILI9341_YELLOW);
if(d<22)tft.fillCircle(120, 200, d, ILI9341_GREEN);
delay(1000);
}
for(uint8_t d=1; d<=120; d=d+20)
{
tft.drawCircle(120, 200, d, ILI9341_CYAN);
if(d<22)tft.fillCircle(120, 200, d, ILI9341_MAROON);
delay(1000);
}
}Loading
esp32-devkit-c-v4
esp32-devkit-c-v4