Connect ESP32 to WiFi - Step-By-Step Tutorial

Published at : 23 Dec 2025

In this video tutorial for absolute beginners, I show how to connect ESP32 to the WiFi network in the simplest way using Visual Studio Code with PlatformIO. Watch this guide to learn about two methods you can try to establish the connection and how you can use the built-in diode as a status indicator.

👍 Subscribe for more IoT and programming tutorials like this: https://www.youtube.com/channel/UCeWDDxqfxpKucuPt5elzmiQ?sub_confirmation=1

Getting Started with ESP32 Video:
https://youtu.be/tc3Qnf79Ny8

Link to the code:
- blocking example: https://github.com/ttarnowski/esp32-wifi-connect/tree/blocking
- non-blocking example: https://github.com/ttarnowski/esp32-wifi-connect/tree/nonblocking

ESP32 Datasheet(specification): https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32_datasheet_en.pdf
NodeMCU-32S Datasheet(specification): https://docs.ai-thinker.com/_media/esp32/docs/nodemcu-32s_product_specification.pdf

Software used in the video:
Visual Studio Code IDE: https://code.visualstudio.com/
PlatformIO Extension: https://platformio.org/platformio-ide
Clang-Format Extensions (Code Formatter): https://marketplace.visualstudio.com/items?itemName=xaver.clang-format

If you don't want to hold the "BOOT" button whenever you upload your code, here's a good article with the workaround (it requires one 10uF electrolytic capacitor):
https://randomnerdtutorials.com/solved-failed-to-connect-to-esp32-timed-out-waiting-for-packet-header/

Social Media:
Twitter: https://twitter.com/t_tarnowski​
Linkedin: https://www.linkedin.com/in/tomasz-ta...​
GitHub: https://github.com/ttarnowski​

Thank you for watching and see you soon!

00:00 Intro
00:22 Requirements
01:17 Creating a new project with VS Code and PlatformIO
02:45 Quick project and program structure overview
03:25 Initial setup (Serial, LED Diode, and WiFi Credentials)
05:28 Blocking method: coding part
10:43 Blocking method: deployment and test of the solution
12:24 Non-blocking method: coding part
20:05 Non-blocking method: deployment and test of the solution
21:18 The End