Jul-12-2021, 10:09 PM
Is the response to read_status is 4 bytes (0xAA, ??, ??, checksum) or 3 bytes (0xAA, status, checksum)?
A failed read appears to raise an exception. According to pyserial documentation that should not happen UNLESS the port is closed or there are multiple devices trying to read the serial port. You should catch the exception and test if the serial port is still open.
A failed read appears to raise an exception. According to pyserial documentation that should not happen UNLESS the port is closed or there are multiple devices trying to read the serial port. You should catch the exception and test if the serial port is still open.