0

I wrote code to read serial every second or so in the tkinter loop using .after(), however it either not working, or hangs up interface. Did lots of debuging, but still got stuck how to read serial in the tkinter mainloop, please help.

def list_ser():
    send_com('D13_R')
    varS = ArduinoSerial.readline().decode('utf-8').strip()
    print(varS) 
    window.after(1000, list_ser)
list_ser()


window.mainloop()
elik
  • 11
  • 1
  • Try [python-to-arduino-serial-read-write](https://stackoverflow.com/questions/24074914/python-to-arduino-serial-read-write) to verify it works at all. – stovfl Apr 13 '19 at 07:38

1 Answers1

0

Fixed it, obviousely I was calling serial read function twice, that is why it was not working. Issue is sorted! Thanks

elik
  • 11
  • 1