#https://sider.ai/share/4a20a72441b95c87c99c10e741a13695
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
// For the Adafruit shield, these are the default.
#define TFT_DC 9
#define TFT_CS 10
#define TFT_RST 8
// Use hardware SPI (on Uno, Nano, etc.) and the above pin
// assignments:
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
void setup() {
tft.begin();
// Basic test, fill the screen with red
tft.fillScreen(ILI9341_RED);
// Draw a green line
tft.drawLine(0, 0, tft.width() - 1, tft.height() - 1, ILI9341_GREEN);
// Draw a blue rectangle
tft.fillRect(tft.width() / 4, tft.height() / 4, tft.width() / 2, tft.height() / 2, ILI9341_BLUE);
// Draw a yellow triangle
tft.fillTriangle(0, tft.height() - 1, tft.width() / 2, 0, tft.width() - 1, tft.height() - 1, ILI9341_YELLOW);
// Draw a cyan circle
tft.fillCircle(tft.width() / 2, tft.height() / 2, tft.width() / 4, ILI9341_CYAN);
// Draw a magenta text
tft.setCursor(10, 10);
tft.setTextColor(ILI9341_MAGENTA);
tft.setTextSize(2);
tft.println("Hello, world!");
}
void loop() {
// You can add more complex graphics or animations here
}