Add Service and MqttSubscriber classes

- Create utils dir and move utils.py there
This commit is contained in:
2023-10-29 20:56:03 -03:00
parent 7df3639923
commit e0422f066b
6 changed files with 84 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
import signal
def _cleanup(*args, **kwargs):
import sys
import RPi.GPIO as gpio
gpio.cleanup()
sys.exit(0)
def setup_cleanup():
signal.signal(signal.SIGINT, _cleanup)