#Original: https://wokwi.com/projects/360519097147837441

import network
import time
import urequests

print("Connecting to WiFi", end="")
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect("Wokwi-GUEST", "")
while not wlan.isconnected():
  print(".", end="")
  time.sleep(0.5)
print(" Connected!")
print(wlan.ifconfig())

print(urequests.get("http://ip.jsontest.com/").json())

while True:
  print("\nCurrent GMT+0 time:")
  r = urequests.get("http://date.jsontest.com")
  print(r.json())
  time.sleep(1)
Loading
pi-pico-w