def __init__(self, com_port):
################################################
# Communications
################################################
self.is_open = False
self.timeout = 30000
self.ser = serial.Serial(
port=com_port,
baudrate=115200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=self.timeout/1000
)
###############################################
# Printer parameters
###############################################
self.x = None # position of x axis
self.y = None # position of y axis
self.z = None # position of z axis
self.e = None # position of extruder
self.feedrate = 10 # feedrate (mm/s)
评论列表
文章目录