ESP32: WIFI Basics and sync to NTP clock (WiFi Part 1) - Arduino

Published at : 23 Dec 2025

In this series I will discuss the WiFi capabilities of the ESP32. Part 1 covers the WiFi basics and shows how to sync to an NTP clock. I used the ESP32-WROOM-32D for the demonstration.

Note: at 3:55 I just noticed that I forgot to explain the connectToNetwork() function. However, I cover that code basically in the second example at 7:33.

For the code refer to:
https://github.com/mo-thunderz/Esp32WifiPart1

For the arduino WiFi library documentation refer to:
https://www.arduino.cc/en/Reference/WiFi

Might you have problems programming the ESP32, pls refer to:
https://youtu.be/xQkE0eDImkE

Part 2 covers how to use the ESP32 as a webserver with websockets and JSON for communication between client and server:
https://youtu.be/15X0WvGaVg8

Correction:
08:04 When timeClient.update() is called it reaches out to the NTP server to get the latest time. Please move timeClient.update() to the last line of the setup instead so that the NTP server is pinged only once.