SOURCE = "https://httpbin.org/get"
HEADER = {"user-agent": "blinka/1.0.0"}

while True:
	while not wifi.radio.connected:
		try:
			wifi.radio.connect(ssid, password)
		except (OSError, RuntimeError, ValueError, ConnectionError) as e:
			print(f"❌ Error: {e}")
    print("📡 Wifi!")
    
	while wifi.radio.connected:
		try:
			with requests.get(url=SOURCE, headers=HEADER) as response:
				response_json = response.json()
		except KeyError as e:
			print(f"❌ Key Error: {e}")