Dynamic Text Label on Tkinter

Asked

Viewed 354 times

2

I researched a lot here in stack and google, I spent all night looking for a simple solution but I did not find, I saw some ways to solve but none worked for me until now.

Situation: I am creating a Python app using Tkinter to manage an Arduino board that controls some functions in a car such as ignition, headlights, battery states, sound etc. All the physical and installation part is ready.

On the Arduin, via serial connection with a netbook, I make a High, and it returns me a character to confirm the high in a rele

In python I get this character and modify a text in the label.

My problem is ae, I can read the character in the serial, but the label does not modify, in the code, this here specifically the situation described:

 status = StringVar()
 if iniciarconexao.receberDados == "e":
   status.set  ("Chave Ligou") 
 else:
   status.set ("Em Espera")     


 caixaestado = Label(Aplicativo, textvariable = status)
 caixaestado.pack (side="bottom")

Here are the links to the full code class code Serial connection with Arduine App Code

All Help and Welcome!

  • You could put all your code here, so it can be analyzed?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.