import tkinter as tk
from tkinter import ttk
class Form1(tk.Tk):
def __init__(self):
super().__init__()
self.title("Form1")
self.geometry("857x706")
self.groupBox1 = ttk.LabelFrame(self, text="Connection")
self.groupBox1.pack()
self.disconnect = ttk.Button(self.groupBox1, text="Disconnect")
self.disconnect.pack(side=tk.LEFT)
self.connect = ttk.Button(self.groupBox1, text="Connect")
self.connect.pack(side=tk.LEFT)
self.comboBox1 = ttk.Combobox(self.groupBox1)
self.comboBox1.pack(side=tk.LEFT)
self.groupBox2 = ttk.LabelFrame(self, text="Serial Port")
self.groupBox2.pack()
self.serialPort1 = None
self.J1Box = ttk.Entry(self.groupBox2)
self.J1Box.pack()
self.groupBox3 = ttk.LabelFrame(self, text="Send Data")
self.groupBox3.pack()
self.sendData = ttk.Button(self.groupBox3, text="Send Data")
self.sendData.pack()
self.groupBox5 = ttk.LabelFrame(self, text="Connection status")
self.groupBox5.pack()
self.comPortStatus = ttk.Label(self.groupBox5, text="OFF", font=("Microsoft
Sans Serif", 20, "bold"), foreground="red")
self.comPortStatus.pack()
self.J1MinusBtn = ttk.Button(self, text="J1 -")
self.J1MinusBtn.pack()
self.J1PlusBtn = ttk.Button(self, text="J1 +")
self.J1PlusBtn.pack()
self.checkJ1 = ttk.Checkbutton(self, text="J1")
self.checkJ1.pack()
self.checkJ6 = ttk.Checkbutton(self, text="J6")
self.checkJ6.pack()
self.checkJ5 = ttk.Checkbutton(self, text="J5")
self.checkJ5.pack()
self.checkJ4 = ttk.Checkbutton(self, text="J4")
self.checkJ4.pack()
self.checkJ3 = ttk.Checkbutton(self, text="J3")
self.checkJ3.pack()
self.checkJ2 = ttk.Checkbutton(self, text="J2")
self.checkJ2.pack()
self.J3Box = ttk.Entry(self)
self.J3Box.pack()
self.J3PlusBtn = ttk.Button(self, text="J3 +")
self.J3PlusBtn.pack()
self.J2Box = ttk.Entry(self)
self.J2Box.pack()
self.J3MinusBtn = ttk.Button(self, text="J3 -")
self.J3MinusBtn.pack()
self.J2PlusBtn = ttk.Button(self, text="J2 +")
self.J2PlusBtn.pack()
self.J2MinusBtn = ttk.Button(self, text="J2 -")
self.J2MinusBtn.pack()
self.J6Box = ttk.Entry(self)
self.J6Box.pack()
self.J5Box = ttk.Entry(self)
self.J5Box.pack()
self.J4Box = ttk.Entry(self)
self.J4Box.pack()
self.J6PlusBtn = ttk.Button(self, text="J6 +")
self.J6PlusBtn.pack()
self.J5PlusBtn = ttk.Button(self, text="J5 +")
self.J5PlusBtn.pack()
self.J4PlusBtn = ttk.Button(self, text="J4 +")
self.J4PlusBtn.pack()
self.J6MinusBtn = ttk.Button(self, text="J6 -")
self.J6MinusBtn.pack()
self.J5MinusBtn = ttk.Button(self, text="J5 -")
self.J5MinusBtn.pack()
self.J4MinusBtn = ttk.Button(self, text="J4 -")
self.J4MinusBtn.pack()
self.Parameters = ttk.LabelFrame(self, text="Parameters")
self.Parameters.pack()
self.accelerationBar = ttk.Scale(self.Parameters, from_=1, to=100)
self.accelerationBar.pack()
self.label2 = ttk.Label(self.Parameters, text="Acceleration")
self.label2.pack()
self.label1 = ttk.Label(self.Parameters, text="Speed")
self.label1.pack()
self.speedBar = ttk.Scale(self.Parameters, from_=1, to=10)
self.speedBar.pack()
self.examplePicture = ttk.Label(self, image=None)
self.examplePicture.pack()
self.groupBox6 = ttk.LabelFrame(self, text="Example photo")
self.groupBox6.pack()
self.groupBox7 = ttk.LabelFrame(self, text="Calibrate joints")
self.groupBox7.pack()
self.calAll = ttk.Button(self.groupBox7, text="Auto calibrate all")
self.calAll.pack()
self.calJ6 = ttk.Button(self.groupBox7, text="Calibrate J6")
self.calJ6.pack()
self.calJ5 = ttk.Button(self.groupBox7, text="Calibrate J5")
self.calJ5.pack()
self.calJ4 = ttk.Button(self.groupBox7, text="Calibrate J4")
self.calJ4.pack()
self.calJ3 = ttk.Button(self.groupBox7, text="Calibrate J3")
self.calJ3.pack()
self.calJ2 = ttk.Button(self.groupBox7, text="Calibrate J2")
self.calJ2.pack()
self.calJ1 = ttk.Button(self.groupBox7, text="Calibrate J1")
self.calJ1.pack()
self.timer1 = None
self.SaveWP1 = ttk.Button(self, text="Save WP1")
self.SaveWP1.pack()
self.SaveWP2 = ttk.Button(self, text="Save WP2")
self.SaveWP2.pack()
self.PLAY = ttk.Button(self, text="PLAY")
self.PLAY.pack()
self.SaveWP3 = ttk.Button(self, text="Save WP3")
self.SaveWP3.pack()
self.disableAll = ttk.Button(self.groupBox7, text="Disable all")
self.disableAll.pack()
if __name__ == "__main__":
form = Form1()
form.mainloop()