//#include "Free_Fonts.h"
#include <SPI.h> // this is needed for display
#include "User_Setup.h"
#include <TFT_eSPI.h>
// The display also uses hardware SPI, plus #9 & #10
// #define TFT_CS 15
// #define TFT_DC 2
// #define TFT_MOSI 11
// #define TFT_SCLK 12
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library with default width and height
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32-S3!");
tft.begin();
tft.writecommand(0x11);
tft.setRotation(3);
tft.fillScreen(TFT_BLACK);
// tft.init();
// tft.setRotation(2);
tft.setCursor(50, 50, 2);
// Set the font colour to be white with a black background, set text size multiplier to 1
tft.setTextColor(TFT_WHITE, TFT_BLUE);
tft.setTextSize(1);
// We can now plot text on screen using the "print" class
tft.println("Hello World!");
}
void loop() {
for (int i = 0; i < 40; i++)
{
int rx = random(60);
int ry = random(60);
int x = rx + random(320 - rx - rx);
int y = ry + random(240 - ry - ry);
tft.drawEllipse(x, y, rx, ry, random(0xFFFF));
}
delay(500); // this speeds up the simulation
}