Feb-15-2020, 06:28 PM
Hi Team
I am new to this forum
I need to Read Data from Serial port and put data to Entry Widgest
This is the code that I used
It display unwanted text with actual text So please advice to remove unwanted text like (b'\x01')
The data coming from Serial port is 1.2,4,5,6
I am new to this forum
I need to Read Data from Serial port and put data to Entry Widgest
This is the code that I used
It display unwanted text with actual text So please advice to remove unwanted text like (b'\x01')
The data coming from Serial port is 1.2,4,5,6
import serial import time from tkinter import * root = Tk() root.title("D Cube Serial Read") e = Entry(root,width = 35, borderwidth = 5) e.grid(row = 0, column = 0, columnspan = 3,padx = 10,pady = 10) ser = serial.Serial('COM3',baudrate = 9600, timeout = 1) time.sleep(2) for x in range (10): s = ser.read() m = str(s) n = list(m) #print(m) e.delete(0,END) e.insert(0,m) root.mainloop()Please advice