/*
Forum: https://forum.arduino.cc/t/creating-graphics-to-display-how-to-get-at-the-colour-codes/1179354
Wokwi: https://wokwi.com/projects/378850204953865217
*/
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
// For the Adafruit shield, these are the default.
#define TFT_DC 9
#define TFT_CS 10
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
Serial.begin(115200);
Serial.println("Start");
tft.begin();
tft.fillScreen(ILI9341_WHITE);
tft.setRotation(1);
drawGraphics();
}
void loop(void) {
}
void drawGraphics() {
// Output of the Python Script to be copied here
tft.fillRect( 20, 20, 100, 100, tft.color565(0x00, 0xFF, 0x00) );
tft.fillRect( 150, 20, 150, 100, tft.color565(0x00, 0x00, 0xFF) );
tft.fillRect( 20, 120, 280, 5, tft.color565(0xD4, 0xAA, 0x00) );
tft.drawRect( 60, 75, 175, 110, tft.color565(0xE1, 0x00, 0x00) );
tft.fillCircle( 140, 190, 40, tft.color565(0xFF, 0x00, 0x00) );
}