IOTHUB SOFTWARE · 02

ESP32 Board Setup in Practice

ESP32 setup is more than adding a URL. Board family, flash size, upload speed, USB driver, and boot mode must match the actual board.

ESP32 Board Setup hero image
Key TermsESP32Boards ManagerCP210xSerial MonitorTFT_eSPI

Arduino IDE knows Arduino boards by default. To use ESP32, you add one setting. You only need to do it once.


Add ESP32 to Boards Manager

code
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

Select Board

Connect ESP32 by USB, then:


Driver Issue

Windows: If Device Manager shows !, the CP210x driver is missing.

Mac: It usually works already. If not, install the same CP210x driver.

Common: Make sure the USB cable supports data. Charging-only cables are a very common reason ESP32 is not detected.


Serial Monitor

Use this to see what ESP32 is doing after uploading code.


TFT_eSPI Setup

Parts 21-22 use a 2.4-inch TFT. For that, edit User_Setup.h in the TFT_eSPI library.

cpp
#define ILI9341_DRIVER
#define TFT_CS   15
#define TFT_DC   2
#define TFT_RST  -1
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_BL   4
#define SPI_FREQUENCY 40000000

Save the file and restart Arduino IDE.


Check Installation

Validate the board before adding sensors

Upload a blank sketch before connecting displays, relays, or sensors. If the bare board uploads and prints logs correctly, later failures can be investigated as wiring, power, or library problems rather than IDE setup problems.

Save project-specific settings

Record Board, Port, Upload Speed, Flash Size, and Partition Scheme. These settings become important once OTA, file storage, or multiple board variants enter the project.

Match the board family

ESP32, ESP32-C3, ESP32-S3, and ESP32-CAM are not interchangeable in Arduino IDE. The wrong selection can compile but fail to upload or behave strangely at runtime.

Upload troubleshooting order

  1. Confirm the port appears only after plugging in the board.
  2. Lower upload speed if flashing is unstable.
  3. Use the BOOT button when the board cannot enter flashing mode.
  4. Disconnect external sensors and loads during upload testing.