logo

同时读取图片和发送uart串口直接报错了

2019-11-23 20:50
D
呵呵洁
import sensor, image, time, math
from pyb import UART

uart = UART(3, 9600, timeout_char=1000)

sensor.reset()
sensor.set_vflip(True)
sensor.set_hmirror(True)
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQQVGA)
sensor.skip_frames(time = 100)   
clock = time.clock()           

THRESHOLD = (3, 37, -22, 20, -40, 19)

while(True):
    img = sensor.snapshot().binary([THRESHOLD]).dilate(5).erode(8)
    uart.write("KR-0,50,0;")
0d6c4803-74ec-4720-9a0f-d533aa0b739e.png
2019-11-24 12:42
I
网红小智智 星瞳科技

我运行这个代码没有出现问题。

不是代码的问题,找一找其他的问题。