Monitor.run¶
-
Monitor.run() → None[source]¶ Monitoring method start upon object creation. The Arduino
deviceis read every second in an endless loop. The temperature data may be saved to a PostgreSQLdatabaseand/or printed to the terminal, if the respectiveterminal_flaganddatabase_flagflags were set.In case of unexpected error (which happens often with the RS-232 communication protocol), the method will try to recover, log any information and continue operations.
To stop logging and break the loop, the
stop()method should be used to set therun_flagflag.