ESP32 Thing Hookup Guide

Contributors: jimblom
Favorited Favorite 23

Using the Arduino Addon

Before we leave you, here are a few tips, tricks, and gotcha's to look out for while you're using the ESP32 Arduino core.

Pin Mapping

The pin number you use for digitalWrite([pin], [value]) or digitalRead([pin]) should match those printed onto the board. You can also reference the graphical datasheet, if the tiny numbers are a strain on the eyes.

Both I2C interfaces are supported by the Wire library. The SDA and SCL pins are assigned, by default, to pins 21 and 22.

I2C SignalESP32 Pin

And the SPI library should support all three possible SPI interfaces. By default, here are the pin mappings for those interfaces:

SPI SignalESP32 Pin

In addition to SPI and I2C, the Arduino core also supports interrupts on any pin with the attachInterrupt() function.

Not Yet Implemented

The Arduino board definitions for the ESP32 are still a work in progress. There are a handful of peripherals and features that have yet to be implemented, including:

  • Analog Input (analogRead([pin]))
  • Analog Ouptut (analogWrite([pin], [value]))
  • WiFi Server and WiFI UDP
  • Real-Time Clock
  • Touch-controller interface

These peripherals are available (if, also, still in their infancy) in the IoT Development Framework for the ESP32. If your application requires analog input, RTC, or any of the features above, consider giving the ESP-IDF a try!