logo

uart = UART(3, 9600,timeout=1000)这个意思是一秒发一次串口数据?为啥它是一直在发?

2021-04-20 15:16
8
m13t

import time

from pyb import UART

# UART 3, and baudrate.

uart = UART(3, 9600,timeout=1000)

while(True):

uart.write("Hello World!\n")

2021-04-20 18:49
1
_65qg

你放在while循环里了,他可不一直在发吗

2021-04-21 19:25
I
网红小智智 星瞳科技

timeout=1000是超时。

2021-04-22 16:36
8
m13t

超时是什么意思?

2021-04-25 16:07
I
网红小智智 星瞳科技

https://forum.singtown.com/topic/6424/timeout的作用