logo

请教程序

2019-02-02 16:57
V
rinz
import time
from pyb import UART
uart = UART(3, 9600)
uart.init(9600, bits=8, parity=None)
data=bytes([0x55,0x55,0x05,0x03,0x02,0xe9,0x06])
while(True):
    uart.write(data)
    time.sleep(1000)

请问这样写对吗

2019-02-02 20:09
I
网红小智智 星瞳科技

有什么问题?

你用星瞳串口助手看到的数据对吗?

https://singtown.com/learn/50240/

https://singtown.com/learn/50235/