by admin

Python Event Driven Serial

  1. Python Serial

(Feb-14-2017, 04:46 PM)nilamo Wrote: Threads merged. Those of us that are here to help, check all the boards. There's no reason to post in more than one place.Anyway, how are you reading data? Don't most interfaces just block until there's something to read? With this line of code:while true:s = serialport.readlinewhich is run on the pi with the python script. A serial connection is between the pi and a desktop.

As I type characters on the terminal (Putty) on the desktop, there should be an interrupt to say data is ready or a flag maybe. I dont want always listen to the serial port (Polling). (Feb-15-2017, 06:43 AM)trainee1 Wrote: (Feb-14-2017, 04:46 PM)nilamo Wrote: Threads merged. Those of us that are here to help, check all the boards.

There's no reason to post in more than one place.Anyway, how are you reading data? Don't most interfaces just block until there's something to read? With this line of code:while true:s = serialport.readlinewhich is run on the pi with the python script. A serial connection is between the pi and a desktop. As I type characters on the terminal (Putty) on the desktop, there should be an interrupt to say data is ready or a flag maybe.

Python Serial

I dont want always listen to the serial port (Polling).Start a thread that waits on a read of the serial port.

Tutor serial data capture/event driven helpTutor serial data capture/event driven help Danny YooThu Dec 15 19:26:29 CET 2005. Previous message:. Next message:. Messages sorted by:On Thu, 15 Dec 2005, Bobby Castleberry wrote: I'm looking to capture weights coming off of several in-motion scales through serial ports and dump them into a database. The database part is easy but I've never worked with serial collection.Hi Bobby,There's a module for handling the serial port called PySerial:Does this look useful for you? You could set up a thread to read datafrom each of your those ports, and just call read.There does appear to be work on making PySerial asynchronous:but I don't know how far this has gone yet; you may want to talk with theTwisted folks for an up-to-date status on it.Best of wishes!. Previous message:.

Python Event Driven SerialPythonPython serial inwaiting

Next message:. Messages sorted.