Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3139

MicroPython • Re: Setting NTP time on Pico W issue

$
0
0
Or maybe this:

Code:

def connect():    sta_if.active(True) #  seems more reliable to start with a fresh connect()    if sta_if.isconnected():        sta_if.disconnect()        print ('started in the connected state, but now disconnected')    else:        print ('started in the disconnected state')    utime.sleep(0.1)        etc
I have also found doing:

Code:

def disconnect():    sta_if.disconnect()    sta_if.active(False)

seems to help.

Statistics: Posted by davefes — Tue Jan 16, 2024 6:49 pm



Viewing all articles
Browse latest Browse all 3139

Trending Articles