Mon, 27 Feb 2023 16:22:19 +0100
Changed the MicroPython super menu to always present the 'Flash UF2 Device' menu entry because some devices don't have a valid serial port when in UF2 'bootloader' mode.
try: import secrets def connectWiFi(): import network import rp2 from time import sleep country = secrets.WIFI_COUNTRY if country: rp2.country(country) wifi = network.WLAN(network.STA_IF) wifi.active(False) wifi.active(True) wifi.connect(secrets.WIFI_SSID, secrets.WIFI_KEY if secrets.WIFI_KEY else None) max_wait = 140 while max_wait: if wifi.status() < 0 or wifi.status() >= 3: break max_wait -= 1 sleep(0.1) if wifi.isconnected(): print("WiFi connected:", wifi.ifconfig()) else: print("WiFi connection failed") connectWiFi() except ImportError: pass