uart.write(bytes(cframe))改为uart.write(cframe)
X
xwm6 发布的帖子
-
请问能否提供一份openmv的UART硬件流控制的dome代码?
使用usb-ttl与ESP32UART硬件流控制正常,接usb-ttl换为OPENMV时出现问题,去掉CTS RTS tcp上位机可接收到jpge,jpge有数据丢失,未达到UART硬件流控制效果。参考中文文档未解决,能否提供一份一份openmv的UART硬件流控制的dome代码?谢谢。
PS:使用IDE2.9.0,固件为4.3.0,UART3(P4 P5) CTS P2 RTS P1。import sensor, image, time import time from machine import UART import utime sensor.reset() # Reset and initialize the sensor. sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE) sensor.set_framesize(sensor.VGA) # Set frame size to QVGA (320x240) sensor.skip_frames(time = 2000) # Wait for settings take effect. uart = UART(3, 5000000,flow=UART.CTS,timtout=1000,timeout_char=1000,read_buf_len=5120) # 使用给定参数初始化 #uart = UART(3, 5000000,timeout_char=1000) #uart.init(5000000,flow=UART.CTS,timeout_char=1000,read_buf_len=5120) # 使用给定参数初始化 #flow=UART.RTS|UART.CTS while(True): frame = sensor.snapshot() cframe = frame.compress(quality=15)#compressed uart.write(bytes(cframe))
-
AttributeError:类型对象“ Pin”没有属性“ PULL_UP”
Traceback (most recent call last):
File "", line 9, in
AttributeError: type object 'Pin' has no attribute 'PULL_UP'
Current datetime1: 2019-02-18 12:02:14
Unique ID: 2969 65f8 91d2 2a17
MicroPython v1.9.3 on 2019-04-26; mimxrt1050-eMicroPython v1.9.3 onType "help()" for more information.