-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGUI.py
More file actions
30 lines (28 loc) · 738 Bytes
/
GUI.py
File metadata and controls
30 lines (28 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import tkinter
import video_streaming as vst
vst.Setup()
label1="Start"
m = tkinter.Tk()
taze = tkinter.IntVar()
vibr = tkinter.IntVar()
def StartStopVideo():
isRunning=vst.ControlVideo(vibr.get())
if isRunning==True:
label1="Stop"
else:
label1="Start"
label2=tkinter.Label(m, text='IP')
e1 = tkinter.Entry(m)
label2.pack()
e1.pack()
but = tkinter.Button(m, text="Set", width=10, command=vst.SetIp(e1.get()))
but.pack()
w = tkinter.Canvas(m, width=1280, height=780)
w.pack()
button = tkinter.Button(m, text=label1, width=25, command=StartStopVideo())
button.pack()
C1=tkinter.Checkbutton(m, text='taze', variable=taze)
C2=tkinter.Checkbutton(m, text='vibrate', variable=vibr)
C1.pack()
C2.pack()
m.mainloop()