Skip to content

ESP32 โ€” Development & Training Guide

Last reviewed: 2026-05-29

The ESP32 is a low-cost, low-power system-on-chip (SoC) microcontroller with integrated Wi-Fi and Bluetooth, developed by Espressif Systems. It's widely used in IoT projects, embedded systems prototyping, and production devices.


Overview

The ESP32 is a dual-core Xtensa LX6 CPU running at up to 240 MHz, with 520 KB of SRAM, integrated 802.11 b/g/n Wi-Fi, Bluetooth 4.2 (BR/EDR + BLE), and a rich set of peripherals (SPI, IยฒC, IยฒS, UART, ADC, DAC, PWM, Hall sensor, temperature sensor). It's Arduino-compatible via the Arduino-ESP32 core and also fully supported in PlatformIO and ESP-IDF (Espressif's native SDK).


Training Content

Display โ€” ST7789 TFT (240ร—240)

A key hands-on project: connecting a 1.3" 240ร—240 IPS TFT display with ST7789 controller to the ESP32 via SPI.

Pin roles:

Signal ESP32 GPIO Function
VCC 3.3V Display logic power
GND GND Ground
BLK 3.3V Backlight (HIGH = on)
SCK GPIO18 SPI Clock
MOSI GPIO23 SPI Data out
DC GPIO15 Data/Command select
RST GPIO27 Hardware reset
CS Not used (always selected)

Key concepts: - SPI communication: ESP32 acts as master, clocks data out on MOSI with SCK - The DC pin differentiates commands from pixel data - No CS pin โ€” display is permanently selected - Correct SPI mode (MODE 3) is critical - Adafruit_ST7789 + Adafruit_GFX libraries handle command sequencing

Wiring caution: Avoid GPIO12, GPIO0, GPIO2 as they affect boot mode. The pinout above uses all safe GPIOs.

MQTT IoT Telemetry Pipeline

Training content covers an end-to-end IoT pipeline using: - ESP8266/ESP32 as the sensor node - BMP280 temperature/pressure sensor - Mosquitto MQTT broker - Python subscriber on the backend

Architecture: Sensor โ†’ ESP32 โ†’ Wi-Fi โ†’ MQTT Broker โ†’ Python subscriber โ†’ data processing.

Servo Motor Control

A servo motor controlled via a rotary angle sensor on the ESP32: - Uses PWM (LEDC peripheral) to drive servo - Rotary sensor (potentiometer) read via ADC - Mapping sensor values to servo angles (0โ€“180ยฐ)

Additional Resources

  • PlatformIO Adafruit_ST7789 โ€” Library installation guide for PlatformIO and Arduino IDE
  • Wemos D1 Mini pinout reference
  • AZ281 display datasheet (French)

Why ESP32?

  • Built-in Wi-Fi/BT โ€” no external modules needed
  • Dual-core โ€” run networking on one core, application on the other
  • Deep sleep โ€” microamps in sleep mode for battery-powered projects
  • Arduino + PlatformIO โ€” beginner-friendly toolchain
  • ESP-IDF โ€” production-grade SDK for advanced use
  • Rich peripheral set โ€” enough for most IoT and embedded projects

Getting Started

  1. Install PlatformIO in VS Code (or Arduino IDE + ESP32 board package)
  2. Wire your ESP32 to the ST7789 display using the pin table above
  3. Install Adafruit_ST7789 and Adafruit_GFX libraries
  4. Run a basic sketch that fills the screen with color
  5. Progress to text rendering, shapes, and sensor data display

Pin Safety Reminder

Some ESP32 GPIOs affect boot behavior: - GPIO0 โ€” boot mode select (pull low for flash mode) - GPIO2 โ€” strapping pin, must be high for normal boot - GPIO12 โ€” flash voltage selection - GPIO15 โ€” strapping pin (also used here for DC โ€” safe post-boot)

Always use safe GPIOs for display and sensor connections.