Files
Spectrometer/motor_passo/utils/utils.py
marisa e0422f066b Add Service and MqttSubscriber classes
- Create utils dir and move utils.py there
2023-10-29 20:56:03 -03:00

13 lines
191 B
Python

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)