#include <WiFi.h>
char ssid[]="Wokwi-GUEST";
char pass[]="";
WiFiClient client;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP321");
WiFi.mode(WIFI_STA);
}
void loop() {
if(WiFi.status()!=WL_CONNECTED)
{
Serial.print ("Attempting to connect");
while(WiFi.status()!=WL_CONNECTED)
{
WiFi.begin(ssid,pass);
Serial.print(".");
delay(5000);
}
Serial.println("\n connected");
}
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}