#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
// For the Adafruit shield, these are the default.
#define TFT_DC 2
#define TFT_CS 15
#define BTN_PIN_EN 12
#define BTN_PIN_UP 14
#define BTN_PIN_DN 13
#define BTN_PIN_C 27
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
pinMode(BTN_PIN_EN, INPUT_PULLUP);
pinMode(BTN_PIN_UP, INPUT_PULLUP);
pinMode(BTN_PIN_DN, INPUT_PULLUP);
pinMode(BTN_PIN_C, INPUT_PULLUP);
// put your setup code here, to run once:
Serial.begin(115200);
// TFT
tft.begin();
tft.setRotation(1);
}
void loop() {
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0, 0);
tft.setTextColor(ILI9341_WHITE); tft.setTextSize(1);
tft.println("Hello World!");
tft.setTextColor(ILI9341_YELLOW); tft.setTextSize(2);
tft.println(1234.56);
tft.setTextColor(ILI9341_RED); tft.setTextSize(3);
tft.println(0xDEADBEEF, HEX);
tft.println();
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(5);
tft.println("Groop");
tft.setTextSize(2);
tft.println("I implore thee,");
tft.setTextSize(1);
tft.println("my foonting turlingdromes.");
tft.println("And hooptiously drangle me");
tft.println("with crinkly bindlewurdles,");
tft.println("Or I will rend thee");
tft.println("in the gobberwarts");
tft.println("with my blurglecruncheon,");
tft.println("see if I don't!");
// return micros() - start;
}