我用OPENMV接收数据,但32发送数据'A'后,openmv大概要等3秒才可以接收到数据'A',有人知道怎么可以加快接受速度吗?
import sensor, image, time,pyb,math
from pyb import UART
#初始化
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
uart = UART(3)
#开头亮灯
clock = time.clock()
for x in range(2):
pyb.LED(3).on()
time.sleep(200)
pyb.LED(3).off()
time.sleep(100)
while(True):
clock.tick()
img = sensor.snapshot()
if uart.any():#如果收到数据
print('OK')
d=uart.readchar()
print(d)#打印数据
if(d=='A'):#如果是A,亮灯
pyb.LED(2).on()我运行代码没有接收数据速度慢这个问题。
只是OpenMV在初始化的时候sensor.skip_frames(time = 2000)会有2s的延时。
@kidswong999 解决了,原来是STM32设置的问题
@cq23 请问你后来是怎么解决的啊,我也遇到这个问题了