File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 99red = board .get_pin ("d:13:o" )
1010white = board .get_pin ("d:12:o" )
1111yellow = board .get_pin ("d:11:o" )
12- m = Tk ()
12+ m = Tk ()#to create tkinter window
1313#function for different led
1414def led (args ):
1515 if args == 1 :
@@ -38,7 +38,7 @@ def led(args):
3838 refresh ()
3939#tkinter code
4040m .title ("GUI + Arduino" )
41- m .geometry ("600x600" )
41+ m .geometry ("600x600" )#size of the window # its "x" not "*"
4242thelabel = Label (m , text = "Welcome to led simulation!" )
4343thelabel .pack (side = TOP )
4444b1 = Button (m , text = "RED LED ON" , command = lambda : led (1 )) # if the fucntions were definded individually/n
@@ -54,7 +54,7 @@ def led(args):
5454b6 = Button (m , text = "YELLOW LED OFF" , command = lambda : led (6 ))
5555b6 .pack ()
5656
57- def refresh (m ):
57+ def refresh (m ):#function to refresh the window after every button click so the window doesn't close
5858 m .destroy ()
5959 m .__init__ ()
6060m .mainloop ()
You can’t perform that action at this time.
0 commit comments