FOUNDATION 2 · BOARD TOUR

Introduction, Board Tour & Setup

Kit: LAFVIN Basic Starter Kit for ESP32  ·  Board: ESP32 DEVKIT V1 (ESP‑WROOM‑32, 30‑pin)

The foundation for every other project: what the ESP32 is, how to read its pins, and how to upload your first sketch.

Brand new to electronics? Read Foundation 1: Electronics & Communication Basics first.

🎯 Objective

By the end of this guide, you will:

  • Describe what the ESP32 is and what it has on board that an Arduino Uno does not.
  • Find your way around the DEVKIT V1: the USB port, the regulator, the EN and BOOT buttons, and the two rows of headers.
  • Read the pinout and pick a GPIO with confidence, knowing which are safe, which are input-only, and which will stop the board booting.
  • Explain the difference between digital and analog pins, and which pins can do which.
  • Install ESP32 support in the Arduino IDE and upload your first sketch.
  • Use the BOOT-button trick when an upload refuses to connect.
  • Power a breadboard safely from the board, and know the difference between 3V3 and VIN.

Still no wiring. This is the tour before the work starts.

1What is the ESP32?

The ESP32 is a low‑cost, low‑power System‑on‑a‑Chip (SoC) from Espressif. A single chip packs:

  • A dual‑core 32‑bit processor (Xtensa LX6) up to 240 MHz
  • Wi‑Fi (2.4 GHz) and Bluetooth (Classic + BLE)
  • 520 KB SRAM and typically 4 MB flash
  • ADC, DAC, PWM, I²C, SPI, UART, and capacitive‑touch peripherals

Its built‑in wireless makes it ideal for IoT: several later projects host a web server right on the board.

Bluetooth is on the chip, not in this kit. Every connected project (5 onward) goes over Wi‑Fi; none of the 13 builds use the BLE or Bluetooth Classic radio. It's there if you want to explore it later, using the BLE library that ships with the Arduino‑ESP32 core.
"ESP32" means two things: the bare chip and the development board around it. We use the DEVKIT V1 board, which adds USB, a regulator, buttons, and header pins so the chip is easy to program.

Deep sleep: the ESP32's low-power mode

Powered over USB, the ESP32 draws tens of milliamps just sitting in loop(). For anything battery‑powered, that adds up fast. Deep sleep shuts down almost everything (Wi‑Fi, most peripherals, most of RAM) and drops current draw to roughly 10 µA: thousands of times less. The chip wakes back up on one of a few wake sources:

  • Timer: wake after a fixed duration, e.g. esp_sleep_enable_timer_wakeup(60 * 1000000) (microseconds), then esp_deep_sleep_start().
  • External pin (ext0 / ext1): wake when a GPIO changes level, e.g. a PIR sensor's output going HIGH.
  • Touch pin: wake when a capacitive‑touch pin is touched.

A deep sleep wakes the chip like a fresh power‑on (your sketch restarts from setup()), so a real project stores anything it needs to remember (like a counter) in RTC memory, not a normal variable. None of the 13 builds use deep sleep, since it's easiest to learn on hardware you can watch respond instantly, but Project 4's PIR sensor produces exactly the kind of GPIO signal an ext0 wake source is built for, once you're ready to try it on your own.

2What's in the kit

LAFVIN ESP32 Basic Starter Kit packing list
The full kit: ESP32 board, breadboard, OLED, sensors, potentiometer, buzzers, relay, LEDs, resistors, buttons, USB cable, and jumper wires.

3Board tour

ESP32 DEVKIT V1 board with major parts labeled
Major parts of the ESP32 DEVKIT V1.
PartWhat it does
Micro‑USB portUploads code and powers the board. Use a data cable, not charge‑only.
CP2102 (USB‑to‑UART)Bridges USB and the ESP32's serial port. Needs the CP210x driver (§8). Some boards use CH340 instead.
Voltage regulatorDrops 5 V (USB/VIN) to the 3.3 V the chip runs on.
EN / RESETRestarts the board and runs the current sketch.
BOOTPuts the chip into flashing mode (§9).
ESP‑WROOM‑32The metal module holding the chip, flash, and PCB antenna.
On‑board LEDsRed = power; blue = wired to GPIO 2 for debugging.

4Specifications

FeatureValueFeatureValue
Cores2 (dual)SRAM520 KB
Clockup to 240 MHzFlash4 MB (typical)
Wi‑Fi2.4 GHz, 150 MbpsGPIO header pins30
BluetoothBLE + ClassicLogic level3.3 V
USB‑UARTCP2102Max current / pin40 mA (keep ≤ 12 mA)

5The pinout

ESP32 DEVKIT V1 pinout diagram
ESP32 DEVKIT V1 pin functions. Most pins are multiplexed: you pick their role in code.
  • I²C: SDA = GPIO 21, SCL = GPIO 22
  • SPI (VSPI): MOSI 23, MISO 19, CLK 18, CS 5
  • UART0 (USB serial): TX0 = GPIO 1, RX0 = GPIO 3
  • DAC (true analog out): GPIO 25, GPIO 26
  • Power: 3V3 (regulated out), VIN (5 V from USB), GND

6Digital vs. analog: the key idea

  • DIGITAL: pin is either HIGH (≈3.3 V) or LOW (0 V). LEDs, buttons, relays, buzzers. digitalRead() / digitalWrite().
  • ANALOG IN: measures a range of voltage (0–3.3 V) → a number 0–4095 (12‑bit). analogRead(). Potentiometer, photoresistor.
  • ANALOG OUT: two true DAC pins (25, 26); for LEDs/motors we usually fake it with PWM (rapidly pulsing a digital pin).

Two ADC banks:

  • ADC1: GPIO 32, 33, 34, 35, 36, 39: always usable.
  • ADC2: GPIO 0, 2, 4, 12, 13, 14, 15, 25, 26, 27: cannot be read while Wi‑Fi is on (prefer ADC1 in Wi‑Fi projects).
ADC is non‑linear near 0 V and 3.3 V: readings flatten at the extremes, so you can't tell 3.2 V from 3.3 V. Keep that in mind for sensor projects.

7Which GPIOs should you use?

CategoryPinsNotes
SAFE general‑purpose4, 13, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 32, 33First choice for inputs and outputs.
STRAPPING0, 2, 5, 12, 15Read at boot. Usable, but a wrong level can block uploading: avoid for sensitive inputs.
BOOT HIGH/PWM1, 3, 5, 14, 15Pulse or go HIGH at reset: may glitch attached outputs.
INPUT‑ONLY34, 35, 36 (VP), 39 (VN)No output, and no internal pull‑up/down.
DO NOT USE6, 7, 8, 9, 10, 11Wired to the internal SPI flash.
Current limit: 40 mA absolute per pin, but keep each under ~12 mA. That's why every LED gets a 220 Ω series resistor.

8Install ESP32 support in Arduino IDE

  1. Install the Arduino IDE (1.8.x or 2.x).
  2. File → Preferences → Additional Boards Manager URLs, add:
    https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  3. Tools → Board → Boards Manager…, search esp32, install "esp32 by Espressif Systems": take version 3.0.0 or newer, since Projects 3 and 6 use the Core 3.x PWM functions.
  4. Tools → Board → select "DOIT ESP32 DEVKIT V1".
  5. If no port appears, install the CP210x driver (repo folder Install CP2101 drivers Windows).
  6. Tools → Port → choose the board's port.
Want the full picture‑by‑picture walkthrough with every dialog? See Foundation 3: Arduino IDE Setup.

9Uploading & the BOOT‑button trick

Location of the BOOT button on the ESP32 board
The BOOT button: hold it if an upload can't connect.

Click Upload, wait for "Done uploading.", then open Serial Monitor at 115200 baud (all our sketches use this).

If you see "Failed to connect to ESP32: … Connecting…":

  1. Press and hold BOOT.
  2. Click Upload.
  3. When "Connecting…" appears, release BOOT.
  4. After "Done uploading", press EN/RESET to run the sketch.

10Breadboard & power basics

  • The outer rails (+ / −, red / blue) run the board's length and carry power. The inner rows connect in groups of 5, split by the center gap.
  • Feed logic power from 3V3+ rail, and GND− rail.
3.3 V vs 5 V: ESP32 GPIOs are 3.3 V: never put 5 V on a GPIO. The PIR sensor and relay modules need 5 V; power those from VIN, but still drive their signal pins with 3.3 V logic.

Reading resistor color bands (this kit ships 5‑band ±1%)

ResistorBandsUsed for
220 ΩRed Red Black Black BrownLED current limiting
10 kΩBrown Black Black Red BrownPull‑down / pull‑up
1 kΩBrown Black Black Brown BrownGeneral purpose

Read with the tolerance band (Brown, ±1%) on the right. The first band gives it away: Red starts the 220 Ω; Brown starts the 10 kΩ and 1 kΩ.

🎯 Knowledge Check

1. What is the ESP32's operating voltage for GPIO pins?

2. Which GPIO pins CANNOT be used at all because they are wired to the internal SPI flash?

3. Which ADC bank stops working when Wi-Fi is active?

4. What should you do if no COM port appears in the Arduino IDE?

5. What is the BOOT button used for during upload?

12Wrapping Up: What You've Learned

You now know the board well enough to stop treating it as a black box. The key takeaways:

  • The ESP32 is a System-on-a-Chip: processor, Wi-Fi, Bluetooth, and peripherals in one part. The Wi-Fi being on the chip is what makes every project from 5 onward possible.
  • The board is not the chip. The DEVKIT V1 adds USB, a 3.3 V regulator, and headers so the chip is easy to program.
  • Not every pin is equal. Some are input-only, some are strapping pins that decide how the board boots, and some are wired to internal flash and must never be touched.
  • 3V3 powers logic, VIN gives you the USB 5 V. GPIOs stay at 3.3 V, always.
  • Digital pins read two states; ADC pins read a range (0–4095). Only some pins have an ADC, and ADC2 stops working while Wi-Fi is on, which is a trap worth remembering now.
  • Uploading has a ritual. The IDE resets the board into its bootloader automatically. When that fails, holding BOOT while it says Connecting... does it by hand.
  • 115200 baud, every time. Garbage in the Serial Monitor is nearly always the wrong rate.

Keep the GPIO Reference open in a tab. You will use it in every project that follows.

13Next

Next, set up your software in Foundation 3: Arduino IDE Setup, then build Project 1: Inputs & Outputs (button + LED) and work up through analog input, PWM, sensors, and the Wi‑Fi web‑server projects.