def connect_serial(self):
if not(self.connect):
try:
for tmp_channel in self.channel:
try:
self.ser = Serial(tmp_channel, 115200, timeout=1) #FIXME, cha nge device id to your system device
print tmp_channel,': connected successfully!'
self.connect= True
break
except:
print tmp_channel,': connection Refused!'
except:
print 'Connection of Arduino refused!'
tkMessageBox.showerror("Error","Connection of Arduino refused!")
else:
tkMessageBox.showerror("Error","Connection of Arduino is already built!")
class_ArduinoSerMntr.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录