自己解决了,wifi板占用PI,改为P4端子就对了
W
wimc
@wimc
0
声望
2
楼层
544
资料浏览
0
粉丝
0
关注
wimc 发布的帖子
-
OpenMV4 Plus一按下按键就卡死,请问怎么解决
import sensor, image, time,network,usocket,pyb from machine import Pin sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QVGA) sensor.skip_frames(time = 2000) clock = time.clock() wlan = network.WINC() wlan.connect("ENJOY2018", key="enjoy12345", security=wlan.WPA_PSK) addr = usocket.getaddrinfo("192.168.43.102", 60000)[0][4] tcpclient = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM) tcpclient.connect(addr) p1 = Pin("P1", Pin.IN, Pin.PULL_UP) while(True): clock.tick() img = sensor.snapshot() if p1.value() == 0: print("send") tcpclient.send('key0')
我想实现按下按钮就发送Tcp消息,现在一按下按键就卡死,请问怎么解决?