File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 9
9
red = board .get_pin ("d:13:o" )
10
10
white = board .get_pin ("d:12:o" )
11
11
yellow = board .get_pin ("d:11:o" )
12
- m = Tk ()
12
+ m = Tk ()#to create tkinter window
13
13
#function for different led
14
14
def led (args ):
15
15
if args == 1 :
@@ -38,7 +38,7 @@ def led(args):
38
38
refresh ()
39
39
#tkinter code
40
40
m .title ("GUI + Arduino" )
41
- m .geometry ("600x600" )
41
+ m .geometry ("600x600" )#size of the window # its "x" not "*"
42
42
thelabel = Label (m , text = "Welcome to led simulation!" )
43
43
thelabel .pack (side = TOP )
44
44
b1 = Button (m , text = "RED LED ON" , command = lambda : led (1 )) # if the fucntions were definded individually/n
@@ -54,7 +54,7 @@ def led(args):
54
54
b6 = Button (m , text = "YELLOW LED OFF" , command = lambda : led (6 ))
55
55
b6 .pack ()
56
56
57
- def refresh (m ):
57
+ def refresh (m ):#function to refresh the window after every button click so the window doesn't close
58
58
m .destroy ()
59
59
m .__init__ ()
60
60
m .mainloop ()
You can’t perform that action at this time.
0 commit comments