ESP32

Most ESP32 boards are now supported by the Arduino IDE. Some of the boards I have used require a little setup.

T-Eth-POE

T-Display

TTGO LoRa32

ESP32 C3

ESP32 S3

ESP WROOM32

LilyGo T-Beam

T-Watch

The LilyGO T-Watch requires special libraries. You can't use the standard TFT_eSPI library, you must get the T-Watch library that includes custom libraries.

Espressif toolchain

I did need to install the ESP32 toolchain from Espressif for one project. This was straightforward on a Mac running OSX. Simply follow the instructions at espressif.com. I needed an older version of the toolchain for the project, which was no problem as espressif keep the previous versions available for just such issues.

The Espressif toolchain is a good old traditional command line system with complier, linker, and make. Easy for some-one comfortable with Unix command line environments. Perhaps a challenge for some-one used to graphical development environments.

i2c

To use I2C with these ESP32 modules you're likely to need to map some GPIO pins to the I2C bus. These new pin definitions are then passed to the Arduino Wire library begin function in setup. You must take care to use pins that are I/O rather than Input only. Check the datasheet. The T-Display board uses 21/22 for SDA/SCL I2C, which is the Arduino default, but the POE board doesn't break out those pins.

For example, on the POE board the expansion connector is:

PinFunctionPinFunction
36Input39Input
34Input35Input
16Input/Output32Input/Output
33Input/Output12Input/Output
04Input/Output15MOSI
02MISO14SCLK

So to use I2C we must select two pins and pass that to the Wire library. We can't use the top four pins (36,39,34,35) because they're input only. There are three pins used for SPI (02,14,15) so they're also not available. Any of the remaining pins can be used (16,32,33,12,04).

The code would include something like this:

#include <Wire.h>

// Pins used for i2c
#define I2C_SDA 33
#define I2C_SCL 32

void setup()
{
  Wire.begin(I2C_SDA,I2C_SCL);
}

SPI

SPI is often used for LCD displays. The pin names used by the ESP32 boards do not always match the pin names used on the LCD displays.

Typical ESP32 naming
NameDescription
MISOMaster In, Slave Out
MOSIMaster Out, Slave In
SCKSerial Clock
CSChip Select

Typical LCD naming
NameDescription
SCLSerial Clock
SDASerial Data
CSChip Select
RSTReset
DCData Command
BLKBacklight

Because most displays are write only, we don't need MISO, only MOSI. Connect MOSI to SDA, SCK to SCL, CS to CS. The RST, DC, and BLK pins can connect to any available GPIO output. These typically get defined in your code or the library being used.