Connect to your Wifi with ESP32 Posted on 2019-05-02 | Edited on 2024-12-25 | In IoT | Comments: Requirements Connect to a Wifi as a station Software123456789101112131415161718192021222324252627282930313233#include <WiFi.h>const char* ssid = "Xiaomi_kaylordut";const char* password = "kaylordut.com";void setup(){ Serial.begin(115200); delay(10); // We start by connecting to a WiFi network Serial.println(); Serial.println(); Serial.print("Connecting to "); Serial.println(ssid); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected"); Serial.println("IP address: "); Serial.println(WiFi.localIP());}void loop(){} Result: