#include <WiFi.h>
char*ssid = "Wokwi-GUEST";
char*pass = "";
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
WiFi.mode(WIFI_STA); // ESP Mode Station
WiFi.begin(ssid,pass);// Memerintahkan ESP32 untuk connected
while(WiFi.status()!= WL_CONNECTED){
delay(100);
Serial.println("wait a minute...");
}
Serial.println("ESP already connected");
Serial.print("Local IP =");
Serial.println(WiFi.localIP());
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}Loading
esp32-devkit-v1
esp32-devkit-v1