Looking at config.py, I was surprised to not see the LED for Pico devices not supported? I had to add the following to my wifi coro to turn the LED on when connected and then off when not. Just a suggestion.
Here is my wifi coro code snippet.
async def OnWiFi(theState):
theModel=sys.implementation._machine
if 'Pico W' in theModel:
LED='LED'
elif 'Pico' in theModel:
LED=25
thePin=machine.Pin(LED, Pin.OUT, value=theState)
Of course I call 'asyncio.run(OnWiFi(False))' to turn it off when needed. Say when I Cntl-C will testing or on a reset.
Looking at config.py, I was surprised to not see the LED for Pico devices not supported? I had to add the following to my wifi coro to turn the LED on when connected and then off when not. Just a suggestion.
Here is my wifi coro code snippet.
async def OnWiFi(theState): theModel=sys.implementation._machine if 'Pico W' in theModel: LED='LED' elif 'Pico' in theModel: LED=25 thePin=machine.Pin(LED, Pin.OUT, value=theState)
Of course I call 'asyncio.run(OnWiFi(False))' to turn it off when needed. Say when I Cntl-C will testing or on a reset.