#include <TFT_eSPI.h>
#include <SPI.h> // this is needed for display
#include <Wire.h> // this is needed for FT6206
#include <Adafruit_FT6206.h>
#include "tft_settings.h";
#include "randomColor.h";
int timePeriod = 1000;
unsigned long time_now = 0;
TFT_eSPI screen = TFT_eSPI(); // Invoke custom library
int period = 1000;
void setup() {
pinMode(27, INPUT);
screen.init();
screen.fillScreen(TFT_BLACK);
screen.setRotation(8);
}
int fps = 0;
void loop() {
fps++;
if (millis() >= time_now + timePeriod) {
time_now += timePeriod;
screen.drawString("fps: " + String(fps) + " ", 0, 0, 2);
fps = 0;
}
screen.fillCircle(random(0,240),random(20,330),random(1,10),randomColor());
}
Loading
ili9341-cap-touch
ili9341-cap-touch