logo

openmv4p使用v3.9.2固件版本,出现串口与电视问题

2021-02-20 11:48
F
mesi
image
import sensor, image, time ,tv
from pyb import UART

from pyb import Pin, Timer

sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
clock = time.clock()
uart = UART(3, 19200)
tv.init() # 初始化tv
# 50kHz pin6 timer2 channel1
#light = Timer(2, freq=18000).channel(1, Timer.PWM, pin=Pin("P6"))
#light.pulse_width_percent(100) # adjust light 0~100


while(True):
    clock.tick()
    img = sensor.snapshot()
    #使用无畸变镜头
    #img.lens_corr(1.8) # strength of 1.8 is good for the 2.8mm lens.
    for code in img.find_qrcodes():
        img.draw_rectangle(code.rect(), color = (255, 0, 0))
        print(code.payload())
        if code.payload() is not None :
            uart.write(code.payload() + "\r")

    tv.display(img)
    if uart.any() :
        a = uart.readline().decode()
        print(a)
   # print(clock.fps())

openmv4p + mt9v034模块 使用v3.9.2固件版本,其他硬件使用 ttl转rs232模块 连接串口转wifi硬件模块出现串口无法使用的问题,即无法发送与接收。刷上固件版本v3.6.8 串口发送和接收可正常使用,是什么原因?

image
2021-02-20 11:53
F
mesi
bf94b2b8-8e38-4af7-85cb-a37e1591a9cf.jpg
d4aa7796-4863-4cb7-b5e6-c769f65a4d0d.jpg
2021-02-22 18:38
I
网红小智智 星瞳科技

这个是两个单独的问题。串口的问题,单独发一个帖子,单独使用串口功能测试。

I
网红小智智 星瞳科技

https://github.com/openmv/openmv/releases/tag/v3.9.3

3.9.3修复了TV扩展版的灰度问题。

2021-02-23 08:41
F
mesi

@kidswong999 好的 谢谢您

F
mesi

@kidswong999 已解决 谢谢您