-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
69 lines (59 loc) · 2.35 KB
/
main.py
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
''' This is the way in which the computer and leap are to
interact. Further reading is required to determine the
connectivity with the Photon. Poly Pocket is a pocket
polygraph device. It uses a few resistors and LEDs,
photosensors and a few other things to '''
from tkinter import Tk, BOTH, CENTER
from tkinter.ttk import Frame, Button, Style, Label
import Leap
class poly_pocket(Frame):
def __init__(self):
window = Tk()
self.parent = window
window.geometry("800x600+50+50")
Frame.__init__(self, window)
self.baseline = 0
self.initUI()
window.mainloop()
def initUI(self):
# Initialize and name Window
self.parent.title("Poly Pocket")
self.style = Style()
self.style.theme_use("default")
self.pack(fill=BOTH, expand=1)
def new_baseline():
return
def old_baseline():
return
def test(baseline):
return
def spark_connect():
return
def leap_connect():
return
def quit():
self.parent.destroy()
return
welcome = "Welcome to Poly Pocket!"
welcome_label = Label(self, text=welcome, font=("Helvetica", 24))
welcome_label.place(x=5, y=5)
welcome_label.pack()
baseline_button = Button(self, text="New Baseline",
command=new_baseline())
recover_baseline_button = Button(self, text="Recover Baseline",
command=old_baseline())
test_button = Button(self, text="Conduct Test",
command=test(self.baseline))
connect_leap_button = Button(self, text="Establish Leap Connection",
command=leap_connect)
connect_spark_button = Button(self, text="Establish Spark Connection",
command=spark_connect)
exit_button = Button(self, text="Quit",
command=quit)
baseline_button.place(relx=0.5, rely=0.3, anchor=CENTER)
recover_baseline_button.place(relx=0.5, rely=0.4, anchor=CENTER)
test_button.place(relx=0.5, rely=0.5, anchor=CENTER)
connect_leap_button.place(relx=0.5, rely=0.6, anchor=CENTER)
connect_spark_button.place(relx=0.5, rely=0.7, anchor=CENTER)
exit_button.place(relx=0.5, rely = 0.8, anchor=CENTER)
poly_pocket()