Example explanation 14-WiFi-Shield->connect wifi connection

Video tutorial 12 - WIFI wireless image transmission: https://singtown.com/learn/50005/
Video Tutorial 39 - WIFI Programming for OpenMV Remote Debugging: https://singtown.com/learn/50899/
# WiFi连接例程
#
# 这个例子展示了如何将你的OpenMV Cam与WiFi扩展连接到网络。

import network
import time

SSID = ""  # Network SSID  填入WiFi名称
KEY = ""  # Network key  填入WiFi密码

# 初始化wlan模块并连接到网络
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(SSID, KEY)

while not wlan.isconnected():
    print('Trying to connect to "{:s}"...'.format(SSID))
    time.sleep_ms(1000)

# 我们现在通过DHCP应该有一个有效的IP
print("WiFi Connected ", wlan.ifconfig())

results matching ""

    No results matching ""