Hi
Thanks for the reply
This is the working code
but when i put the root.mainloop() to the inside of the while loop as showing following
See the image
https://1drv.ms/u/s!AvrJlo2hoIofhhuaViWgHjtNjOVe
Please advice
Thanks in advanced
Thanks for the reply
This is the working code
import serial from tkinter import * from time import sleep values = [] root = Tk() root.geometry('600x200') cnt=0 var = StringVar() serialArduino = serial.Serial('COM3',baudrate = 9600, timeout = 1) root.title("D Cube Serial Read") e = Entry(root,width = 35, textvariable = var ,borderwidth = 5) e.grid(row = 0, column = 0, columnspan = 3,padx = 10,pady = 10) while True: valueRead = serialArduino.readline() print(valueRead) var.set(valueRead) #var.set('My Var') root.mainloop()You can see the root.mainloop() does not inside the while loop so then the result is showing in the python shell and it does not load the widget and GUI .only reading showing the python shell
b'' b'11\r\n' b'12\r\n' b'13\r\n' b'14\r\n' b'15\r\n' b'16\r\n' b'17\r\n' b'18\r\n' b'19\r\n'Out Put
but when i put the root.mainloop() to the inside of the while loop as showing following
while True: valueRead = serialArduino.readline() print(valueRead) var.set(valueRead) #var.set('My Var') root.mainloop()Then it will load the GUI but the values read from serial port does not display on widget and in this case the value does not show python shell too
See the image
https://1drv.ms/u/s!AvrJlo2hoIofhhuaViWgHjtNjOVe
Please advice
Thanks in advanced