Python Forum
Super basic tkinter arduino issue
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Super basic tkinter arduino issue
#2
This is your problem:
while 1: 
     
    arduinoData = ser.readline().decode('ascii')
    print(arduinoData) 

## You will never get here!!!
var.set('My Var')
root.mainloop()
What you are trying to do is actually quite difficult. Perhaps the hardest type of programming.

You need to read the serial port while simultaneously running root.mainloop(). This means you either need to find a non-blocking way to read the serial port, or you need to read the serial port in a separate process and pass the strings to the GUIO process to be displayed.

I don't know how to do that on Arduino lol!
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 deanhystad - Jan-07-2021, 06:18 AM
RE: Super basic tkinter arduino issue - by Kurta - Jan-07-2021, 04:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Lightbulb [Tkinter] Tkinter Class Import Module Issue AaronCatolico1 6 3,382 Sep-06-2022, 03:37 PM
Last Post: AaronCatolico1
Photo tkinter issue mate 4 2,660 Dec-06-2020, 09:03 PM
Last Post: mate
  Issue in Tkinter with winfo_class() and LabelFrame ReDefendeur 1 2,824 Oct-05-2020, 05:52 AM
Last Post: Jeff900
  [Tkinter] tkinter: after issue edwin6938 1 3,515 Aug-25-2020, 04:37 PM
Last Post: Larz60+
  Tkinter: increasing numbers and Radiobutton issue PeroPuri 1 2,237 Apr-13-2020, 05:48 PM
Last Post: deanhystad
  [Tkinter] tkinter issue with variables carrying over between functions PengEng 1 1,823 Apr-06-2020, 06:13 PM
Last Post: deanhystad
  Issue on tkinter with buttons Reldaing 1 2,507 Jan-07-2020, 08:21 AM
Last Post: berckut72
  [Tkinter] Tkinter window issue frequency 4 3,475 Dec-24-2018, 10:49 AM
Last Post: frequency
  Tkinter positional information issue thatguy14 4 3,547 Jul-05-2018, 06:49 PM
Last Post: woooee
  [Tkinter] Tkinter widgets driving Arduino uno output pins woodcncwnc 3 4,682 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