Python Forum
Super basic tkinter arduino issue
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Super basic tkinter arduino issue
#4
(Jan-07-2021, 04:00 PM)Kurta Wrote: I can live without the while

I just want the panel to display once a minute or button press

readline() blocks waiting for a newline. This will make your GUI freeze whenever you are reading from the serial port. It is better than freezing forever, but it still does not make for a good GUI experience.

The best solution, I think, is to start a separate process to handle the serial port. The process would uses a queue to communicate with the GUI process. Your GUI application would periodically check if there is any data in the serial queue and display the data when found.

Since many Arduino applications involve communicating with hardware I would expect there to already be a solution to this problem. It would be worth you while to spend some time searching for what others have done. Just looking around for a little while I ran across these:

https://www.instructables.com/UART-Contr...ter-serial
Kurta likes this post
Reply


Messages In This Thread
Super basic tkinter arduino issue - by Kurta - Jan-07-2021, 04:14 AM
RE: Super basic tkinter arduino issue - by Kurta - Jan-07-2021, 04:00 PM
RE: Super basic tkinter arduino issue - by deanhystad - Jan-07-2021, 05:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Lightbulb [Tkinter] Tkinter Class Import Module Issue AaronCatolico1 6 3,298 Sep-06-2022, 03:37 PM
Last Post: AaronCatolico1
Photo tkinter issue mate 4 2,631 Dec-06-2020, 09:03 PM
Last Post: mate
  Issue in Tkinter with winfo_class() and LabelFrame ReDefendeur 1 2,795 Oct-05-2020, 05:52 AM
Last Post: Jeff900
  [Tkinter] tkinter: after issue edwin6938 1 3,481 Aug-25-2020, 04:37 PM
Last Post: Larz60+
  Tkinter: increasing numbers and Radiobutton issue PeroPuri 1 2,216 Apr-13-2020, 05:48 PM
Last Post: deanhystad
  [Tkinter] tkinter issue with variables carrying over between functions PengEng 1 1,805 Apr-06-2020, 06:13 PM
Last Post: deanhystad
  Issue on tkinter with buttons Reldaing 1 2,495 Jan-07-2020, 08:21 AM
Last Post: berckut72
  [Tkinter] Tkinter window issue frequency 4 3,440 Dec-24-2018, 10:49 AM
Last Post: frequency
  Tkinter positional information issue thatguy14 4 3,512 Jul-05-2018, 06:49 PM
Last Post: woooee
  [Tkinter] Tkinter widgets driving Arduino uno output pins woodcncwnc 3 4,654 Jan-29-2018, 08:21 PM
Last Post: woodcncwnc

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020