Label with Dynamic Text in Tkinter

2

I researched a lot here in the stack and google, I stayed all night looking for a simple solution but I did not find it, I saw some form of solving but none worked for me so far.

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, etc. All the physical and installation parts are ready.

In the arduino, via serial connection with a netbook, I make a High, and it returns me a character to confirm the high in a relay

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

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

 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 complete codes code class Serial Connection with Arduino App Code

All Help and Welcome!

    
asked by anonymous 15.08.2017 / 16:32

0 answers