代码拉取完成,页面将自动刷新
from microWifi import MicroWifi
from machine import Timer
from time import sleep
# ============================================================================
# ===( Functions )============================================================
# ============================================================================
def _timerProcess(timer) :
print('-----------------------------')
print('Access point opened : %s' % wifi.IsAccessPointOpened())
print('Connected to AP : %s' % wifi.IsConnectedToAP())
print('Internet access : %s' % wifi.InternetAccessIsPresent())
print('google.com IP address : %s' % wifi.ResolveIPFromHostname('google.com'))
print('-----------------------------')
# ============================================================================
# ===( Main )=================================================================
# ============================================================================
print()
print("=======================================================================")
print()
print() # ----------------------------------------------
wifi = MicroWifi()
Timer.Alarm(_timerProcess, 3, periodic=True)
if not wifi.OpenAccessPointFromConf() :
wifi.OpenAccessPoint('.-= AP TEST =-.', None, '192.168.0.254')
if not wifi.ConnectToAPFromConf() :
wifi.ConnectToAP('JCzic', 'azerty123')
print()
print("=======================================================================")
print()
# ============================================================================
# ============================================================================
# ============================================================================
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。