Getting Started with ESP32 and Arduino (Part 3): Connecting to WiFi and Retrieving Current Time
The ESP32 has a built-in WiFi module, making it very simple and convenient to connect to WiFi. The code is as follows: #include <WiFi.h> const char* ssid = "WIFI_NAME"; const char* password = "WIFI_PASSWORD"; void setup() { Serial.begin(115200); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { // statement delay(500); Serial.println("Connecting to WiFi…"); } Serial.println("Connected to the … Read more