import network
import time
WIFI_SSID = 'Wokwi-GUEST' # Default Wokwi SSID
WIFI_PASS = ''
#Connect to WiFi
wlan = network.WLAN(network.STA_IF) #Create WiFi Station Interface
wlan.active(True) #Activate the interface
wlan.connect(WIFI_SSID, WIFI_PASS) #Ask for a Connection
print('WiFi', end="")
while not wlan.isconnected():
print(".", end="") #Wait for Connection
time.sleep(0.5)
print('', wlan.ifconfig()[0], '[Connected]') # Print the IP Address