my.dict = {
'ns': "next station is"
}
I wrote a code for serial communication, and the code is working. If i send the key 'ns' through serial port to other pc,the value "next station is" printing on the screen.
My dought is, can i send a string with the key.
ex: 'ns' abcd.
if i send 'ns' abcd through serial port, on the other pc it has to print as next station is abcd.
User Profile
Collapse
-
How to display variable serial data on Tkinter window.
...Code:import serial import threading import Queue import Tkinter as tk class SerialThread(threading.Thread): def __init__(self, queue): threading.Thread.__init__(self) self.queue = queue def run(self): s = serial.Serial('COM10',9600) while True: if s.inWaiting(): text = s.readline(s.inWaiting())
No activity results to display
Show More