#include "WiFi.h"
// char* refers to the memory location of a string literal.
// This string literal should not be changed at runtime.
// const is used to warn the programmer (and compiler) not to modify the string literal
const char* ssid = "Wokwi-GUEST";
const char* password = "";
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.println("Hello, ESP32!");
while(WiFi.status() != WL_CONNECTED){
delay(500);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to the WiFi network");
Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}