ESP32—WIFI联网一直失败 搞不懂

ESP32—WIFI连接

from machine import Pin
import network
import time

print('hi esp32-micropython')

LED = Pin(12,Pin.OUT)

count = 0
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
if not wlan.isconnected():
print('connecting to wifi')
wlan.connect('snt','12345678')
while not wlan.isconnected() and count<20:
LED.value(not LED.value())
count+=1
time.sleep(0.5)
if wlan.isconnected():
LED.value(1)
print('ip address:',wlan.ifconfig()[0])
else:
LED.value(0)
print('wifi connect fail')
(连接自己手机的个人热点)

运行结果是这样的

img

不管怎么弄都还是这个样子
各位帮帮忙