Monitor.run

Monitor.run()None[source]

Monitoring method start upon object creation. The Arduino device is read every second in an endless loop. The temperature data may be saved to a PostgreSQL database and/or printed to the terminal, if the respective terminal_flag and database_flag flags 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 the run_flag flag.