@wfb3 有人吗?急急急!!!!!
W
wfb3
@wfb3
0
声望
5
楼层
508
资料浏览
0
粉丝
0
关注
wfb3 发布的帖子
-
RE: 这个语法没错误啊!!!!!!!!!
@wfb3
import sensor, image #导入需要使用的模块from pyb import Pin #引入pin脚
from pyb import LED #引入自带LED
green_led = LED(2)
red_led = LED(1)
pin9 = Pin('P9', Pin.IN, Pin.PULL_UP) #p9输入信号
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA)
sensor.skip_frames(time = 2000)
while(True):
img = sensor.snapshot().lens_corr(1.8) for c in img.find_circles(threshold = 2000, x_margin = 10, y_margin = 10, r_margin = 10): # img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0)) #画圆 #以下为接收到pin9信号 if pin9.value(): #如果pin9为1,进入数据传输 red_led.on() #红灯代表正在传数据