#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#ifdef ESP8266
#define STMPE_CS 16
#define TFT_CS 0
#define TFT_DC 15
#define SD_CS 2
#elif defined(ESP32) && !defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
#define STMPE_CS 32
#define TFT_CS 22
#define TFT_DC 21
#define SD_CS 14
#else
// Anything else, defaults!
#define STMPE_CS 6
#define TFT_CS 9
#define TFT_DC 10
#define SD_CS 5
#endif
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
Serial.begin(115200);
// delay(10);
Serial.println("Hello Pekatonix!");
tft.begin();
}
void loop(void) {
// for(uint8_t rotation=0; rotation<4; rotation++) {
// tft.setRotation(rotation);
testText();
delay(10000000000);
// }
}
unsigned long testText() {
tft.fillScreen(ILI9341_BLACK);
unsigned long start = micros();
tft.setCursor(1, 2);
tft.setTextColor(ILI9341_YELLOW); tft.setTextSize(2);
tft.println("Hello Pekatonix!");
tft.setTextColor(ILI9341_GREEN); tft.setTextSize(2);
tft.println(1234.56);
return micros() - start;
}