Electronics for Building Things · Lesson 13 · The Microcontroller
What's actually on your board — and why the ESP32 is the home-automation brain.
You've been driving pins since Lesson 1 without a clear picture of the thing behind them. This lesson gives you that picture: what a microcontroller board is, what each pin can do, and how the Arduino and ESP32 differ — so you can pick the right board and the right pin for a job.
A microcontroller is a whole small computer on one chip: a processor (runs your code), memory (holds the program and variables), and built-in peripherals (the hardware that does timing, analog reading, PWM, and communication). It's an integrated circuit — Lesson 12's ideas apply directly.
The board (Arduino, ESP32 dev board) wraps that chip with the support it needs: a voltage regulator (clean power, from Lesson 4), a USB connection (to upload code and power it), and the chip's pins broken out to a row of labeled headers you can wire to.
Most pins are GPIO — General-Purpose Input/Output. Each can be a digital output (drive HIGH/LOW) or input (read HIGH/LOW). Many pins have extra talents layered on:
3V3/5V/VIN and GND are not programmable; they feed your circuit.| Arduino Uno | ESP32 | |
|---|---|---|
| Logic voltage | 5V | 3.3V (not 5V-tolerant) |
| Usable GPIO | ~20 | ~25 |
| PWM pins | 6 specific pins | Almost any pin |
| Analog inputs | 6 (10-bit) | Many (12-bit) |
| Wireless | None built in | Wi-Fi + Bluetooth |
| Processor | 1 core, 8-bit | 2 cores, 32-bit, faster |
For your mission, the deciding row is Wi-Fi: it's what lets a gadget report to or be controlled from your phone or home server (SparkFun: ESP32 Thing Hookup Guide).
See also: Glossary · Signals & buses · Rules of thumb