Files
python_tools/daemon/uart_test.py
ranchuan a866e93ad7 检测后赋码如果返回200也保存赋码结果
添加电机下降按钮
每次赋码结果采用不同的颜色
2023-10-25 19:06:22 +08:00

22 lines
405 B
Python

import serial
import serial.tools.list_ports
ser = serial.Serial(port="/dev/ttySTM1", baudrate=115200,bytesize=serial.EIGHTBITS,parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,timeout=None)
# file=open("/dev/ttySTM1","wb")
# file.write(b"tVersion.txt=\"V1.04\"")
# file.write(bytearray([0xff,0xff,0xff]))
ser.write(b"tVersion.txt=\"V1.04\"")
ser.write(bytearray([0xff,0xff,0xff]))