There's a project I am working on and I am using kivy. I receive some input and that input gets stored in a variable that changes almost every 50 milliseconds I just want kivy to print JUST the current value of the variable in the text box. I know this is not a good representation of the question. But I just tried to simplify it.
If you didn't understand the question very well, the next section is a bit more detailed:
I am using an arduino to get some input.
That input is stored into a variable myData
. So obviously it keeps changing.
I want myData to be printed in the kivy screen. You don't really need knowledge of arduino for this question.
Heres the python code for arduino:
import serial
import time
info = serial.Serial('com3',9600)
def arduino():
while True:
if info.inWaiting()>0 :
myData = info.readline()
myData = myData.decode('utf-8')
arduino()
Python code for kivy is pretty standard. The kivy file is what I need.