Basically this means you have not received anything on the serial port during the wait time defined in the port configuration:...
but when executing the following code,
ser.read() --I got b' '
ser.readlines() -- I got [ ]
Just don't understand why the reading returns are empty.
Code:
ser = serial.Serial ('dev/ttyS0',115200, timeout=1)
The guide (found at this page) states:
The requested number of bytes is defined in the read() command and defaults to 1 character and any number of characters up to AND INCLUDING the end of line for readline()timeout = None: wait forever / until requested number of bytes are received
timeout = 0: non-blocking mode, return immediately in any case, returning zero or more, up to the requested number of bytes
timeout = x: set timeout to x seconds (float allowed) returns immediately when the requested number of bytes are available, otherwise wait until the timeout expires and return all bytes that were received until then.
Statistics: Posted by MiscBits — Mon Apr 22, 2024 8:07 pm