def wifi_disconnect():
# Disconnect from the current network. You may have to
# do this explicitly if you switch networks, as the params are stored
# in non-volatile memory.
wlan = network.WLAN(network.STA_IF)
if wlan.isconnected():
print("Disconnecting...")
wlan.disconnect()
else:
print("Wifi not connected.")
评论列表
文章目录