User Profile

Collapse

Profile Sidebar

Collapse
steve472
steve472
Last Activity: Sep 20 '13, 12:32 PM
Joined: Jun 22 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Can a string attached to a dictionary key and sent through serial port.

    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.
    See more | Go to post

  • 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())
    ...
    See more | Go to post
No activity results to display
Show More
Working...