/* Plotter mit TFT ILI9341
Teil A - Adafruit_ILI9341
Modifikation von https://wokwi.com/arduino/projects/307567963154678338
*/
#include <Adafruit_ILI9341.h>
#define TFT_SCK 18
#define TFT_MOSI 23
#define TFT_MISO 19
#define TFT_CS 22
#define TFT_DC 21
#define TFT_RESET 17
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
#define WIDTH 320
#define HEIGHT 240
void setup(void) {
Serial.begin(115200); Serial.println("Start Setup");
tft.begin();
tft.fillScreen(ILI9341_BLACK);
tft.setRotation(1);
tft.setTextColor(ILI9341_YELLOW, ILI9341_BLACK); tft.setTextSize(3);
tft.setCursor(0, 15); tft.print("Young Engineer");
tft.setRotation(2);
tft.setTextColor(ILI9341_YELLOW, ILI9341_BLACK); tft.setTextSize(2);
tft.setCursor(12,2); tft.print("mrge.de");
delay(1111);
tft.drawLine( 0, 0, HEIGHT, 0, ILI9341_RED);
tft.drawLine( 0, 0, 0, WIDTH, ILI9341_RED);
tft.drawLine( 0, 0, 0, WIDTH, ILI9341_RED);
tft.fillRect(120, 40, 50, 70, ILI9341_RED);
tft.drawRect( 40,120, 20, 30, ILI9341_WHITE);
tft.fillCircle(100, 100, 30, ILI9341_BLUE);
tft.drawCircle(100, 200, 30, ILI9341_YELLOW);
tft.drawFastHLine(20, 100, 50, ILI9341_YELLOW);
tft.drawFastVLine(30, 100, 80, ILI9341_GREEN);
tft.drawTriangle(100, 150, 130, 170, 120, 140, tft.color565(0, 255, 255));
tft.fillTriangle(150, 250, 130, 170, 220, 140, tft.color565(0, 255, 255));
tft.drawRoundRect(200, 220, 30, 40, 15, tft.color565(255, 0, 255));
Serial.println("Ende Setup");
}
void loop() {}