Monitor¶
Description
-
class
arduino_temperature_sensors.Monitor.Monitor(device: arduino_temperature_sensors.ArduinoBoard.ArduinoBoard, name: str = 'Monitor Thread', database_flag: bool = False, database_config_file: str = None, terminal_flag: bool = False, table_name: str = 'epic_temperature')[source]¶ Manages a background
threadwhich logs data from the TPG-256Adevice.Attributes
Listof data labels to save.Database usage
flag.Databaseobject.Arduino devicehandler.Flagto signal the thread to stop.Name of the PostgreSQL table where data will be saved.
Terminal output
flag.Methods
Initializes the
Monitorobject.Ensures the
databaseis ready to accept data from the Arduinodevice.Prints the retrieved data to the terminal.
Monitoring method start upon object creation.
Saves the latest temperature data to the PostgreSQL
database.Clears the
run_flagto signal the background thread to stop.