import sensor,image,time,pyb,ujson
import math
from pyb import UART
from pyb import LED
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA)
sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False)
sensor.set_auto_whitebal(False)
clock = time.clock()
red_threshold = (0,100, 0,127, 0,127)
while(True):
img.binary([red_threshold])
img.dilate(2)
请在这里粘贴代码因为你没有snapshot,看看hello world。
谢谢学长,恍然大悟