Example: 50-OpenMV-Boards/53-N6-Boards/50-Board-Control/uart_control.py

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

import time
from machine import UART

# UART 3 has TX on P4 and RX on P5 on the OpenMV N6.
# 第二个参数是UART波特率。
uart = UART(3, 19200, timeout_char=200)

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

results matching ""

    No results matching ""