logo

使用usb转ttl调试,openmv发helloworld,串口助手为什么无反应?

2021-04-13 22:51
A
_53dy
# 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)
c3188dce-4c1a-4c8e-b625-70fe1e8c0052.png
7cbb5084-5039-48f0-98e6-a1e7628d551c.jpg

tx接openmv rx

电脑上正确显示两个串口

openmv没有问题,其他代码正常运行

2021-04-14 18:41
I
网红小智智 星瞳科技

接反了吧。

OpenMV的tx应该接串口模块的tx。