例程讲解14-WiFi-Shield->tcp_client
import network, usocket
SSID=''
KEY=''
print("Trying to connect... (may take a while)...")
wlan = network.WINC()
wlan.connect(SSID, key=KEY, security=wlan.WPA_PSK)
print(wlan.ifconfig())
addr = usocket.getaddrinfo("www.google.com", 80)[0][4]
client = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM)
client.connect(addr)
client.settimeout(1.0)
client.send("GET / HTTP/1.0\r\n\r\n")
print(client.recv(1024))
client.close()
星瞳科技OpenMV官方中文文档函数讲解:
星瞳科技OpenMV官方中文文档函数讲解:
星瞳科技OpenMV官方中文文档函数讲解: