#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include <Fonts/FreeSansBold12pt7b.h>
#define TFT_DC 9
#define TFT_CS 10
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
#define RED 0xc086
#define WHITE 0xffff
#define BLUE 0x010d
void setup() {
tft.begin();
tft.setRotation(3);
tft.fillScreen(BLUE);
// draw white diagonals
tft.fillTriangle(0, 0, 0, 31, 279, 239, WHITE);
tft.fillTriangle(0, 0, 319, 239, 279, 239, WHITE);
tft.fillTriangle(0, 0, 36, 0, 319, 239, WHITE);
tft.fillTriangle(36, 0, 319, 239, 319, 208, WHITE);
tft.fillTriangle(0, 239, 0, 209, 279, 0, WHITE);
tft.fillTriangle(0, 239, 279, 0, 319, 0, WHITE);
tft.fillTriangle(0, 239, 319, 0, 319, 30, WHITE);
tft.fillTriangle(319, 30, 0, 239, 40, 239, WHITE);
// draw white cross
tft.fillRect(120, 0, 80, 240, WHITE);
tft.fillRect(0, 79, 320, 80, WHITE);
// draw red cross
tft.fillRect(136, 0, 48, 240, RED);
tft.fillRect(0, 96, 320, 48, RED);
// draw red diagonals
tft.fillTriangle(0, 0, 108, 79, 78, 79, RED);
tft.fillTriangle(0, 0, 0, 20, 78, 79, RED);
tft.fillTriangle(200, 69, 200, 79, 294, 0, RED);
tft.fillTriangle(200, 79, 294, 0, 319, 0, RED);
tft.fillTriangle(319, 0, 214, 79, 200, 79, RED);
tft.fillTriangle(210, 159, 319, 239, 319, 220, RED);
tft.fillTriangle(319, 220, 237, 159, 210, 159, RED);
tft.fillTriangle(0, 239, 107, 159, 120, 159, RED);
tft.fillTriangle(120, 159, 0, 239, 26, 239, RED);
tft.fillTriangle(26, 239, 120, 159, 120, 169, RED);
}
void loop(void) {}