def __init__(self, master): #default settings master.protocol('WM_DELETE_WINDOW', self.destroy) #useful global variales self.width = master.winfo_screenwidth() self.height = master.winfo_screenheight() self.master = master self.frame = Frame(master) self.directory = None #Set up the serial connection self.control = linearRobotControl.linearRobotControl() #change the title and icon master.wm_title("Gilroy Lab Robot Control Interface") master.iconbitmap('plantIcon.ico') #generate the user interface with two framed sections, one for the top and one for the bottom. self.makeMenu(master) self.top = Frame(master=master, height=self.height / 4, width=self.width / 2 - 20) self.top.pack() self.bottom = Frame(master=master, height=self.height / 4, width=self.width / 2 - 20) self.createBottomButtons(self.bottom)
def __init__(self, master): #default settings master.protocol('WM_DELETE_WINDOW', self.destroy) #useful global variales self.width = master.winfo_screenwidth() self.height = master.winfo_screenheight() self.master = master self.frame = Frame(master) self.directory = None #Set up the serial connection self.control = linearRobotControl.linearRobotControl() #change the title and icon master.wm_title("Gilroy Lab Robot Control Interface") master.iconbitmap('plantIcon.ico') #generate the user interface with two framed sections, one for the top and one for the bottom. self.makeMenu(master) self.top = Frame(master=master, height=self.height/4, width=self.width/2-20) self.top.pack() self.bottom = Frame(master=master, height=self.height/4, width=self.width/2-20) self.createBottomButtons(self.bottom)
import linearRobotControl, debug control = linearRobotControl.linearRobotControl() debug.debug = True control.setPort(16) control.setBaud(9600) control.openConnection() control.home() control.move(1) control.home() control.move(2) control.move(-1) control.quit() print "Done."