from machine import Pin
import neopixel
import time
import network

ap_if = network.WLAN(network.AP_IF)
ap_if.active(False)
sta_if = network.WLAN(network.STA_IF)
sta_if.active(False)
sta_if.active(True)
sta_if.connect("wvss-iotlab", "geheim1234")

np = neopixel.NeoPixel(Pin(27),1)

while True:
    time.sleep(0.1)
    if sta_if.isconnected() == False:
        np[0] = (100, 0, 0) 
    else:
        np[0] = (0, 100,0)
        np.write()
        print(sta_if.ifconfig())



