logo

openmv无法输出数据

2023-08-18 22:40
J
oihz

我用IDE把程序烧录到openmv之后,串口调试助手显示“串口打开失败”

5ec4fef2-82c6-4204-b58e-6a6e29fd8320.png

需要自己拔一次数据线再重新连接,串口会显示已打开,但是无法输出数据

且过几秒之后IDE会这样

ba132139-02e5-4d74-b29d-93696b0f42c8.jpg

代码就是最简单的让openmv输出helloworld

# UART Control
#
# This example shows how to use the serial port on your OpenMV Cam. Attach pin
# P4 to the serial input of a serial LCD screen to see "Hello World!" printed
# on the serial LCD display.

import time
from pyb import UART

# Always pass UART 3 for the UART number for your OpenMV Cam.
# The second argument is the UART baud rate. For a more advanced UART control
# example see the BLE-Shield driver.
uart = UART(3, 19200)

while(True):
    uart.write("Hello World!\r")
    time.sleep_ms(1000)
2023-08-19 01:32
I
网红小智智 星瞳科技

星瞳串口助手,要链接串口调试扩展板(或者其他ttl转usb模块)的COM口,而不是OpenMV的COM口。

2023-08-19 12:27
J
oihz
f544321a-cebd-427d-bf82-08d1dccc6d9a.png

按照这里的教程我用了TTL-USB,出现了上面我说的问题。所以TTL-USB不能用吗?

以及,我是需要用openmv给esp8266传输数据,也需要扩展版吗?

2023-08-21 12:44
I
网红小智智 星瞳科技

可以使用ttl-usb模块。

你的故障原因是:星瞳串口助手连接了OpenMV的COM口。你COM口选错了。

解决办法是:星瞳串口助手连接ttl-usb模块的COM口。