def connect(self):
"""
Open tty connection to sensor
"""
if self.link is not None:
self.disconnect()
self.link = serial.Serial(self.port, 9600, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE, dsrdtr=True, timeout=5, interCharTimeout=0.1)
评论列表
文章目录