Occasionally, the communication of data over the serial stops. It happens with both the Arduino IDE Serial Monitor as well as the Python script.
Problem might be the connection of USB with my MacBook Pro, as that only has USB-C connectors and I'm using a small adapter form USB-A to USB-C.
It is noticable with the set water level function, as the Arduino is busy with it for a while and, while busy, is sending data regularly. When communication fails, no data is updated on my computer's end, but the demonstrator setup remains pumping until desired water level is reached.
Currently I reset this situation by unplugging and replugging the USB into my MacBook.
Check whether the break in communication can be spotted in Python. And if so, automatically reconnect (if possible).
Occasionally, the communication of data over the serial stops. It happens with both the Arduino IDE Serial Monitor as well as the Python script.
Problem might be the connection of USB with my MacBook Pro, as that only has USB-C connectors and I'm using a small adapter form USB-A to USB-C.
It is noticable with the set water level function, as the Arduino is busy with it for a while and, while busy, is sending data regularly. When communication fails, no data is updated on my computer's end, but the demonstrator setup remains pumping until desired water level is reached.
Currently I reset this situation by unplugging and replugging the USB into my MacBook.
Check whether the break in communication can be spotted in Python. And if so, automatically reconnect (if possible).