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.
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
- Open Arduino IDE.
- Mac:
Arduino IDE→Settings. Windows:File→Preferences. - Paste this URL into
Additional boards manager URLs:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json- Press
OK. - Click the Boards Manager icon on the left.
- Search
esp32. - Click
Installonesp32 by Espressif Systems. It is large, so it can take a few minutes.
Select Board
Connect ESP32 by USB, then:
Tools→Board→ESP32 Arduino→ESP32 Dev Module.Tools→Port→ choose the ESP32 port. Windows often showsCOM3; Mac often shows/dev/cu.usbserial-XXXX.Tools→Flash Size→4MB (32Mb).
Driver Issue
Windows: If Device Manager shows !, the CP210x driver is missing.
- Download and install the CP210x USB to UART Bridge driver.
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.
Tools→Serial Monitor.- Set the number at the bottom right to 115200. If you miss this, the text becomes garbage.
- Press the
ENbutton on the ESP32 board once. New messages should appear.
TFT_eSPI Setup
Parts 21-22 use a 2.4-inch TFT. For that, edit User_Setup.h in the TFT_eSPI library.
#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
- Can you see
ESP32 Dev ModuleunderTools→Board? - Can you see the ESP32 port under
Tools→Port? - Try
File→Examples→01.Basics→Blink→ upload. If the LED blinks, it worked.
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
- Confirm the port appears only after plugging in the board.
- Lower upload speed if flashing is unstable.
- Use the BOOT button when the board cannot enter flashing mode.
- Disconnect external sensors and loads during upload testing.