ESP32
Table of Contents
- Which boards do we use?
- How does the Arduino Uno or Leonardo differ from ESP32?
- Programming the ESP32
- Lessons
- Whatβs next?
Welcome π to the ESP32 module! The ESP32 is a fast, low-cost, WiFi- and Bluetooth-enabled microcontroller that has become the platform for Internet of Things (IoT) projects. And the best part? You can program it with Arduinoβso everything you learned in the Intro to Arduino series carries over! In this module, youβll learn how the ESP32 differs from the Arduino boards youβve used before, and youβll build projects that blink LEDs, fade lights with PWM, play tones, sense capacitive touch, and connect to the cloud βοΈ. Letβs go! π
Figure. The ESP32 family includes dozens of variants from Espressif and third-party manufacturers. They are fast (up to 240 MHz dual-core), have built-in WiFi and Bluetooth, and many development boards cost around $10 USD!
The ESP32 lessons assume you have completed both our Intro to Electronics and Intro to Arduino tutorial series. While not absolutely necessary, we build on concepts from those modulesβlike voltage dividers,
digitalWrite,analogWrite, and PWMβwithout re-explaining them here. If this is your first time on our website, welcome ππ½βwe recommend starting there!
Which boards do we use?
For our tutorial series, we use Adafruitβs ESP32 boards in the Feather form factor; however, you should be able to use almost any ESP32 board on the market and follow along (you might need to change pin numbers). Specifically, our lessons use:
-
The Adafruit ESP32-S3 Feather (4MB Flash, 2MB PSRAM) β our primary board for Spring 2026. Features native USB-C, WiFi, BLE 5.0, and an onboard NeoPixel.
-
The Adafruit Huzzah32 ESP32 Feather β uses the original ESP32. Our earlier videos and Fritzing diagrams reference this board, but all code transfers directly to the S3.
Because both boards share the Feather form factor and use the same ESP32 Arduino core, the lessons work with either boardβyouβll just need to consult the correct pin diagram. Weβll note specific differences where they arise. See Lesson 1 for detailed specs, pin diagrams, and a side-by-side comparison with the Arduino Uno.
You can find far cheaper ESP32 boards on AliExpress or Amazonβsometimes just a few dollarsβand our lessons should work with them too. Adafruit boards cost more but offer reliable build quality, thorough documentation, and the Feather ecosystem of stackable expansion boards (βFeatherWingsβ).
Chips, modules, and development boards
Itβs worth clarifying the supply chainβand differences between chips, modules, and development boardsβsince the terminology can be confusing and the layering actually explains the price differences youβll see online.
- The chip: Espressif designs the ESP32-S3 chip (the bare SoC). Working with bare silicon is difficult: it requires custom printed circuit boards (PCBs), complex surface-mount soldering, and precise RF antenna tuning.
- The module: To simplify manufacturing, Espressif packages the chip into modules (like the ESP32-S3-WROOM-1). Modules add flash memory, an integrated antenna, and metal RF shielding. Crucially, they are pre-certified by the FCC, saving hardware designers from expensive regulatory testing. However, you still canβt easily plug a module into a laptop or a breadboard.
- The development board: This is where the maker companies come in. They bridge the gap between industrial components and human-usable prototyping tools. They take the Espressif module and build a development board around it, adding the missing essentials: a USB connector, a USB interface for programming and serial communication, a 3.3V voltage regulator (since USB provides 5V), battery charging circuitry, and breadboard-friendly header pins.
Thatβs why an Adafruit Feather costs ~$18 while a bare Espressif module costs a few dollars. Youβre paying for the hardware that makes the chip accessible, standard form factors (like the plug-and-play Feather ecosystem), and high-quality documentation. Because your code targets the underlying ESP32-S3 chip, it runs identically across all these boardsβonly the pin layout and onboard peripherals differ. We discuss the specific pin diagrams for our boards in Lesson 1.
How does the Arduino Uno or Leonardo differ from ESP32?
If youβre coming from the Intro to Arduino series, here are the key things to know upfront:
The ESP32 runs on 3.3V power and logic, not 5V like the Arduino Uno and Leonardo. This affects how you interface with sensors and LEDsβand you can damage your board by applying 5V to a GPIO pin! Weβll cover this in detail in Lesson 1.
- Way more computational power: The ESP32 runs at up to 240 MHz with a 32-bit dual-core processorβ15x faster than the 16 MHz, 8-bit ATmega chips in the Uno and Leonardo, with vastly more memory.
- WiFi and Bluetooth built in: No shields needed! This is what makes the ESP32 ideal for IoT projects.
- More pins, more PWM: The ESP32 has more GPIO pins, and all of them can do PWM (not just 6 like the Uno).
- 12-bit ADC: The ESP32βs analog-to-digital converter has 12-bit resolution (0β4095) compared to the Unoβs 10-bit (0β1023).
- Different PWM and tone APIs: The ESP32 Arduino library uses a different approach for PWM output and tone generationβweβll walk you through it!
- Native USB (ESP32-S3): The ESP32-S3 has native USB support, so it can act as a keyboard, mouse, MIDI device, or disk driveβno external USB-to-serial converter needed.
- Capacitive touch sensing: The ESP32 has built-in capacitive touch hardwareβno external components required.
Programming the ESP32
For our learning series, we program the ESP32 using Arduino (C/C++)βspecifically, Espressifβs open-source Arduino core for the ESP32 family. This means most of your prior Arduino learning transfers directly (woohoo! π). You can use the same Arduino IDE, the same setup()/loop() structure, and many of the same functions like digitalRead, analogRead, and Serial.print.
The tradeoff is that the Arduino core is a convenience layer on top of the ESP32βs native SDK. It doesnβt expose all of the chipβs featuresβyou can see the supported libraries hereβand it adds some overhead compared to programming the chip directly. For our purposes, though, Arduino is a good choice: it lets us focus on learning physical computing concepts rather than wrestling with a new toolchain.
That said, the ESP32 is completely independent of the Arduino ecosystemβjust as you donβt have to use Arduino to program the ATmega328P (used in the Uno) or the ATmega32u4 (used in the Leonardo), you donβt have to use Arduino to program the ESP32. Here are some alternatives you may want to explore in the future:
- ESP-IDF (C/C++): Espressifβs official IoT Development Framework is a production-grade, FreeRTOS-based SDK that provides full access to the ESP32βs hardware. Itβs what youβd likely use in industryβmore powerful and efficient, but also more complex. If you want to try it, follow the ESP-IDF Getting Started guide.
- CircuitPython / MicroPython: Python-based alternatives that are great for rapid prototyping. See Adafruitβs CircuitPython guide for the ESP32-S3 Feather.
- PlatformIO: A professional IDE and build system that supports ESP32 with both Arduino and ESP-IDF frameworks, and integrates with VS Code.
Lessons
These lessons are interactive and designed to be completed in order. All ESP32 code is open source and in this GitHub repository.
Lesson 1: Introduction to the ESP32
Learn about the ESP32 platform, how it compares to the Arduino Uno and Leonardo, and how to set up your development environment. Youβll get familiar with the pin diagram and important hardware differences like the 3.3V operating voltage.
Lesson 2: Blinking an LED
Write your first ESP32 program! The code is the same as the Arduino Blink lessonβthe challenge here is getting comfortable with the new board and its pin layout.
Lesson 3: Fading an LED with PWM
Learn how to use PWM output on the ESP32 to fade an LED. This is where things start to diverge from Arduino: instead of analogWrite, the ESP32 uses the LEDC (LED Control) library, which gives you more control over PWM channels, frequencies, and resolutions.
Lesson 4: Analog Input
Use the ESP32βs 12-bit ADC to read a potentiometer and control an LEDβs brightnessβcombining analog input with PWM output.
Lesson 5: Playing Tones
Learn how to play tones and melodies on the ESP32 using the tone() function (now supported in ESP32 Arduino core v3.x!) and the LEDC PWM library.
Lesson 6: Capacitive Touch Sensing
The ESP32 has built-in capacitive touch sensing hardwareβno external components needed! In this lesson, youβll use a bare wire (or aluminum foil) as a touch sensor to control an LED.
Lesson 7: Internet of Things
Connect your ESP32 to WiFi and upload sensor data to the cloud using Adafruit IO. This is where the ESP32 truly shines! β¨
Whatβs next?
Once youβve completed the ESP32 lessons, youβll have a solid foundation for building WiFi-connected, sensor-driven projects. Consider exploring more advanced topics like Bluetooth Low Energy (BLE), deep sleep for battery-powered projects, or building your own web server directly on the ESP32!