import network
import time
SSID = "Wokwi-GUEST"
PASSWORD = ""
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(SSID, PASSWORD)
print("Connecting to WiFi...", end="")
while not wlan.isconnected():
time.sleep(0.5)
print("Connected!\nIP Address:", wlan.ifconfig()[0])