import serial as ser
import time
import struct
a, b, c, d = 1, 2, 3, 4
while True:
se = ser.Serial("/dev/ttyTHS1", 115200, timeout=1)
se.write("6".encode())
print("6")
time.sleep(1)
如图和代码所示。使用jetson串口通信模块,波特率设置为115200,jetson端输入字符“6”,每隔1秒发送一次,最后只在串口调试助手上接收到少量的6,其他均为乱码。请问这可能是什么原因呢?
你先16进制显示出来看看到底发了些什么
文章:Jetson Nano 踩坑记 中也许有你想要的答案,请看下吧