diff --git a/mqtt/tempSensor.py b/mqtt/tempSensor.py index 188aa24..8a7036d 100644 --- a/mqtt/tempSensor.py +++ b/mqtt/tempSensor.py @@ -88,7 +88,7 @@ def publish(client, temp, humidity): time.sleep(5.0) -def run(): +def run(sensor): # We first check if a libgpiod process is running. If yes, we kill it! for proc in psutil.process_iter(): if proc.name() == 'libgpiod_pulsein' or proc.name() == 'libgpiod_pulsei': @@ -101,4 +101,4 @@ def run(): publish(client, temp, humidity) if __name__ == '__main__': - run() \ No newline at end of file + run(sensor) \ No newline at end of file