ESP32 Getting Started: First Flash and WiFi Scan
The ESP32 packs dual-core processing, WiFi, Bluetooth and rich peripherals into a board cheaper than a pizza. Getting from boxed board to first wireless sketch takes twenty minutes once you know the two quirks. Bootloader button and board manager.
> At a glance: 7 minute guide · part 1 of 10 in the complete IoT and ESP32 guide track · includes a worked example and a quick-reference table.
## Board support and wiring
Here is the working theory in one pass. Install the ESP32 board package via Boards Manager, then select your exact variant (DevKit, WROOM, C3…). Most boards auto-enter bootloader; older ones need BOOT held during “Connecting…”. USB power is enough no external supply required for the first flash.
| S | p | e | c | | | | | | | | | |
| — | — | — | — | — | — | — | — | — | — | — | — | — |
| E | S | P | 3 | 2 | | ( | W | R | O | O | M | ) |
| N | o | t | e | | | | | | | | | |
| Cores | 2 × 240 MHz | Plenty for WiFi + logic | | | | | | | | | | |
| Flash/RAM | 4 MB / ~520 KB | PSRAM on some variants | | | | | | | | | | |
| Logic level | 3.3 V | Not 5 V tolerant | | | | | | | | | | |
| WiFi | 802.11 b/g/n | 2.4 GHz only | | | | | | | | | | |
| Deep sleep | ~10 µA | Battery projects | | | | | | | | | | |
## First sketch: scan the air
The WiFiScan example lists every access point with RSSI. It proves the radio, antenna and toolchain in one run. Read RSSI as signal strength: −40 dBm excellent, −80 dBm marginal. This sketch is also the tool you will reuse for site surveys.
## Two habits from day one
Set a unique hostname and put WiFi reconnect logic in loop() examples often connect once in setup() and die when the router reboots. Our reconnection cluster covers the robust pattern.
## How to apply this in your build
Work through the sequence below each step assumes the previous one passed. For numbers that need calculating, the linked tools at the end of this guide do the arithmetic instantly.
1. Install the ESP32 board package and drivers
2. Select the exact board and port from Tools
3. Open the WiFiScan example and upload
4. Open Serial Monitor at 115200 and read the networks list
### Worked example
A first scan printing 9 networks, strongest at −44 dBm, confirms the radio path works. The same sketch run near a planned mounting spot predicts whether an external antenna is needed. Run the numbers yourself with the Battery Life Calculator and the result should agree to within rounding.
> Practical note from the bench. Keep a dedicated “test” ESP32 flashed with WiFiScan and a GPIO blink it isolates toolchain problems from project problems in minutes.
## Common mistakes to avoid
– Holding BOOT only after “Connecting…” appears timing missed, upload fails
– Feeding 5 V signals into 3.3 V GPIO
– Assuming the 5 V pin outputs regulated 5 V from USB on every variant
## Key takeaways
– Board support and wiring the foundation of this guide; revisit it if any measurement here surprises you.
– First sketch: scan the air the foundation of this guide; revisit it if any measurement here surprises you.
– Two habits from day one the foundation of this guide; revisit it if any measurement here surprises you.
## Who this guide is for
Beginners get a single focused topic instead of a whole textbook chapter. It works as an early stop in the complete IoT and ESP32 guide path. Intermediate readers use it as a reference the table, the worked example and the mistake list answer the questions that come up mid-build. If you teach, the structure (theory, application, example, failure modes) maps cleanly onto a lab session.
## What you need before starting
Nothing exotic: the parts or tools named in the guide, a multimeter. The Battery Life Calculator open in a tab. Install the ESP32 board package and drivers before you begin the guide assumes it and keep the quick-reference table above within sight while you work through the steps.
### Quick reference card
| Aspect | Where to find it in this guide |
| — | — |
| Core theory | Board support and wiring |
| Application steps | How to apply this in your build |
| Worked numbers | Worked example |
| Failure modes | Common mistakes to avoid |
## How this fits the complete IoT and ESP32 guide track
This guide is one stop in the structured learning path. Start from the [complete IoT and ESP32 guide](/tutorial/iot-esp32-complete-guide) pillar page for the full map, or continue with [ESP32 strapping pins](/tutorial/esp32-gpio-strapping-pins) and [robust WiFi reconnection](/tutorial/esp32-wifi-reconnection-strategies). For the arithmetic, open the [Battery Life Calculator](/tools/battery-life).
## Frequently asked questions
Why will my ESP32 not upload?
Ninety percent of cases: wrong board variant, or the bootloader needs the BOOT button. Both are Tools-menu fixes.
Can I program ESP32 like an Arduino?
Yes the Arduino core, plus PlatformIO or ESP-IDF when you need more control.
Is there a calculator for this?
Yes the [Battery Life Calculator](/tools/battery-life) tool runs the formulas from this guide instantly, client-side, with no signup.
## Continue the learning path
– The complete iot, sensors & esp32 guide: [IoT, Sensors & ESP32 complete guide](/tutorial/iot-esp32-complete-guide)
– Read next: [lorawan for beginners: long-range iot without wifi](/tutorial/lorawan-tutorial-beginners)
– Also in this track: [antenna basics for iot: wavelength, gain and matching](/tutorial/antenna-basics-tutorial)
– Continue with: [biomedical sensors: how wearables measure the body](/tutorial/biomedical-sensor-guide)
– Calculate as you go: [battery life estimator](/tools/battery-life) · [LM317 regulator designer](/tools/lm317-regulator) · [wire gauge checker](/tools/wire-gauge-awg)
– Bookmark this page against the day a measurement surprises you. Most readers return to the table and the mistake list first, and that is the correct order.
## Measurement discipline
Keep a lab notebook entry for every build in this track. The measured values, the deviations from the guide and the reason for each. Six months from now, those notes are worth more than any tutorial. They describe your bench and your components rather than a general case.
When a result here disagrees with your expectation, write down both numbers before changing anything. The gap between predicted and measured is where the real engineering lives. It is usually a tolerance, a parasitic or an assumption that was never checked.
## Hard-won notes
Measure current during transmit bursts. Sags under load are power problems, no firmware fixes those.
Location, then device, then measurement. Document the tree before flashing the first device.
## One more thing before you build
A note on radio current, which defines this track: transmit bursts draw in spikes, not averages. Scope the supply or log RSSI before concluding the protocol is at fault.
Working through Board support and wiringand First sketch scan the air with that habit in mind takes minutes, and it is the difference between reading about this topic and owning it.
Procirel