for getting in touch with Pyserial I wanted to set up a very small test environment. My basic idea was just opening two python consoles, one for writing at a port and one for reading from the same port. Unfortunately it did not work:
Here what I did:
Console 1:
import serial
serwrite = serial.Serial()
serwrite.port = 0
serwrite.open()
serwrite.write("testtext")
serwrite.close()
Console 2:
import serial
serread = serial.Serial()
serread.port = 0
serread.timeout = 15
serread.open()
a = serread.read()
but then the output of a
is ' ' .
I am assuming that it is not that easy as I imagined. I based this test on the idea that a port is more or less like a pin I can write on and read from.
Thanks a lot!