Idk I guess — Arduino Uno simulation

An interactive Arduino Uno circuit simulation you can run free in your browser on Velxio, by chip5s.

Components

Sketch code

// Blink LED Example
// Toggles the built-in LED on pin 13

#include <SPI.h>

//#include <XPT2046_Touchscreen.h>

// TFT_eSPI random website says more performance?
// random website : https://pcbsync.com/ili9341-arduino/

#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>

// Pin definitions (display then touch)
#define CSPIN 10
#define RESETPIN 9
#define DCPIN 8
#define MOSIPIN 11
#define SCKPIN 13
#define MISOPIN 12

#define T_CLKPIN 13
#define T_CSPIN 4
#define T_DINPIN 11
#define T_DOPIN 12
#define T_IRQ 2

// Touch part of screen
//const unsigned int RAW_MIN = 200;
//const unsigned int RAW_MAX = 3900;
//XPT2046_Touchscreen touchScreen(T_CS);

// Display part of screen
Adafruit_ILI9341 display(CSPIN, DCPIN);


// IMPORTANT
// To get from 5.0v to 3.3v use a resistor voltage divider (2200000 in and 3300000 out)

#define BORDER_HEIGHT 120
#define BORDER_WIDTH 20

void DrawBorders(unsigned int color) // Only needs to be done once as borders don't change
{
  // Top and bottom
  display.fillRect(0, 0, 240, BORDER_HEIGHT, color);
  display.fillRect(0, 320 - BORDER_HEIGHT, 240, 320, color);

  // Left and right
  display.fillRect(0, BORDER_HEIGHT, BORDER_WIDTH, BORDER_HEIGHT, color);
  display.fillRect(240 - BORDER_WIDTH, BORDER_HEIGHT, BORDER_WIDTH, 320 - BORDER_HEIGHT, color);
}
void ClearScreen(unsigned int color)
{
  display.fillRect(BORDER_WIDTH, BORDER_HEIGHT, 240 - BORDER_WIDTH * 2, 320 - BORDER_HEIGHT * 2, color);
}

void setup() 
{
  Serial.begin(115200);
  // Touch stuff
  // touchScreen.begin();
  // Display stuff
  display.begin();
  display.fillScreen(ILI9341_WHITE);

  DrawBorders(ILI9341_BLUE);

  unsigned long startTime = millis();
  ClearScreen(ILI9341_RED);
  Serial.print(millis() - startTime);
  Serial.println(" ms");
}
unsigned int colors[5] = {ILI9341_RED, ILI9341_BLUE, ILI9341_WHITE, ILI9341_BLACK, ILI9341_YELLOW};
void loop() 
{
  delay(1000);
  
  unsigned int colorIndex = 0;
  display.fillScreen(colors[colorIndex++]);
  Serial.println("runs");
}