Example: 50-Arduino-Boards/Portenta-H7/50-Board-Control/uart_control.py

# 本作品采用MIT许可证授权。
# 版权所有 (c) 2013-2023 OpenMV LLC。保留所有权利。
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# UART控制
#
# 此示例展示了如何在OpenMV Cam上使用串口。 Attach pin
# P4连接到串口LCD屏幕的串口输入,以看到“Hello World!”打印
# 在串口LCD显示屏上。

import time
from pyb import UART

# 始终为您的OpenMV Cam传递UART 3作为UART编号。
# 第二个参数是UART波特率。有关更高级的UART控制
# 示例,请参阅BLE-Shield驱动程序。
uart = UART(3, 19200, timeout_char=200)

while True:
    uart.write("Hello World!\r")
    time.sleep_ms(1000)

results matching ""

    No results matching ""