There’s a bit of setup involved in getting Arduino code to run. Here are the steps I followed.

Download the Arduino IDE here, then follow these steps to run code on an ESP32:

  1. In Preferences, paste the following link into Additional boards manager URLs:
https://dl.espressif.com/dl/package_esp32_index.json
  1. In Tools > Boards > Boards Manager, search for “esp32”. There should be one result, “esp32 by Espressif Systems”—install it.

  2. Select the ESP32 board by clicking Tools > Boards > esp32 > TTGO T1.

  3. In Tools > Manage Libraries, search for “TFT_eSPI Bodmer”. Install the one with the title “TFT_eSPI”.

  4. In Preferences, copy the filepath specified under “Sketchbook location”. cd into that directory in your terminal/terminal emulator. There should be a libraries directory in there. cd libraries/TFT_eSPI, then open User_Setup_Select.h with a text editor. In this file, there should be lines like this:

#include <User_Setup.h>           // Default setup is root library folder

...

//#include <User_Setups/Setup25_TTGO_T_Display.h>    // Setup file for ESP32 and TTGO T-Display ST7789V SPI bus TFT

Uncomment the second line, and comment the first:

//#include <User_Setup.h>           // Default setup is root library folder

...

#include <User_Setups/Setup25_TTGO_T_Display.h>    // Setup file for ESP32 and TTGO T-Display ST7789V SPI bus TFT

Now, you should be ready to run code on your ESP32!*

*I had some difficulty getting code to export from my Mac, if your compilation is failing with an error message that ends with A fatal error occurred: Failed to write to target RAM, try following the steps in this issue comment.