Skip to content

Commit d752084

Browse files
committed
Tkinter and arduino
1 parent 4cf76f6 commit d752084

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tkinter_led.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@
1212
def led_on():
1313
while True:
1414
led.write(1)
15-
refresh(m)
15+
refresh(m)#this causes a problem which can removed by removing 'm'
16+
#but then the window will close after one click
1617

1718
def led_off():
1819
while True:
1920
led.write(0)
2021
refresh(m)
2122

2223
m.title("GUI + Arduino")
23-
m.geometry("100x100")#pady for grid and themes for tkinter
24+
m.geometry("100x100")#pady for grid and themes for tkinter. To get themes pip install ttkthemes
2425
thelabel = Label(m, text = "Welcome to led simulation!")
2526
thelabel.pack(side = TOP)
2627

0 commit comments

Comments
 (0)