import network
import time
from machine import Pin

led=Pin(5,Pin.OUT)

print("Connecting to WiFi", end="")

red = network.WLAN(network.STA_IF)
red.active(True)
'''red.connect('Wokwi-GUEST', '')'''
red.connect('Amayranie2019',"middlewareOracle92")

while not red.isconnected():
  print(".", end="")
  time.sleep(0.1)
print(" Connected!")

if red.isconnected():
    led.value(1)
    print(red.isconnected())
else:
    led.value(0)