# try: status_leds = Leds(number=CAPABILITIES["channels"]) channels = list() current_sensors = CurrentSensors(current_sensor_configuration) wlan = network.WLAN(network.STA_IF) wlan.active(True) if not wlan.isconnected(): log.info("Connecting to WiFi...") wlan.connect("Bill Wi The Science Fi", "225261007622") # wlan.connect("HSBNEWiFi", "HSBNEPortHack") while not wlan.isconnected(): time.sleep(0.25) status_leds.set_channel(4, OFF) status_leds.set_channel(5, BLUE) time.sleep(0.25) status_leds.set_channel(4, BLUE) status_leds.set_channel(5, OFF) status_leds.set_channel(4, OFF) status_leds.set_channel(5, OFF) # get our device ID (the mac address of the WiFi radio) and initialise our kCharge packet class DEVICE_ID = ubinascii.hexlify(wlan.config("mac")).decode("utf8") packet = Packet(1, DEVICE_ID, CAPABILITIES) # initialise our tempreature sensors class temperature_sensors = TemperatureSensors(status_leds)