检测后赋码如果返回200也保存赋码结果
添加电机下降按钮 每次赋码结果采用不同的颜色
This commit is contained in:
21
daemon/uart_test.py
Normal file
21
daemon/uart_test.py
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
|
||||
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]))
|
||||
|
||||
|
Reference in New Issue
Block a user