from tkinter import *
import g_code as gc
import config as cfg
import serial

ser = serial.Serial("/dev/ttyACM0", cfg.BAUDRATE)

gui = Tk()
gui.title('GUI for laser printer')
gui.geometry("1000x500+100+200")

def endstop_status():
    gc.check_endstops(ser)
    
# Button_H = Button(gui,text='Homing',command=gc.check_endstops(ser))
Button_H = Button(gui,text='Test_function',command=endstop_status)
Button_H.pack()
# Button_H.place(x = 100, y = 490)

gui.mainloop()
# while True:
#     gui.update_idletasks()
#     gui.update()
92a0dd18de69b90f0075872d49877b2069ed2c8d
<mask token>


def endstop_status():
    gc.check_endstops(ser)


<mask token>

<mask token>
gui.title('GUI for laser printer')
gui.geometry('1000x500+100+200')


def endstop_status():
    gc.check_endstops(ser)


<mask token>
Button_H.pack()
gui.mainloop()

<mask token>
ser = serial.Serial('/dev/ttyACM0', cfg.BAUDRATE)
gui = Tk()
gui.title('GUI for laser printer')
gui.geometry('1000x500+100+200')


def endstop_status():
    gc.check_endstops(ser)


Button_H = Button(gui, text='Test_function', command=endstop_status)
Button_H.pack()
gui.mainloop()

from tkinter import *
import g_code as gc
import config as cfg
import serial
ser = serial.Serial('/dev/ttyACM0', cfg.BAUDRATE)
gui = Tk()
gui.title('GUI for laser printer')
gui.geometry('1000x500+100+200')


def endstop_status():
    gc.check_endstops(ser)


Button_H = Button(gui, text='Test_function', command=endstop_status)
Button_H.pack()
gui.mainloop()

from tkinter import *
import g_code as gc
import config as cfg
import serial

ser = serial.Serial("/dev/ttyACM0", cfg.BAUDRATE)

gui = Tk()
gui.title('GUI for laser printer')
gui.geometry("1000x500+100+200")

def endstop_status():
    gc.check_endstops(ser)
    
# Button_H = Button(gui,text='Homing',command=gc.check_endstops(ser))
Button_H = Button(gui,text='Test_function',command=endstop_status)
Button_H.pack()
# Button_H.place(x = 100, y = 490)

gui.mainloop()
# while True:
#     gui.update_idletasks()
#     gui.update()