The Arduino IDE
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:
- In
Preferences
, paste the following link intoAdditional boards manager URLs
:
https://dl.espressif.com/dl/package_esp32_index.json
-
In
Tools > Boards > Boards Manager
, search for “esp32”. There should be one result, “esp32 by Espressif Systems”—install it. -
Select the ESP32 board by clicking
Tools > Boards > esp32 > TTGO T1
. -
In
Tools > Manage Libraries
, search for “TFT_eSPI Bodmer”. Install the one with the title “TFT_eSPI”. -
In
Preferences
, copy the filepath specified under “Sketchbook location”.cd
into that directory in your terminal/terminal emulator. There should be alibraries
directory in there.cd libraries/TFT_eSPI
, then openUser_Setup_Select.h
with a text editor. In this file, there should be lines like this:
Uncomment the second line, and comment the first:
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.