Add executables dir & Encoder class

This commit is contained in:
2023-10-29 20:56:03 -03:00
parent a066b13d20
commit 2d782959a2
6 changed files with 67 additions and 2 deletions

12
motor_passo/utils.py Normal file
View File

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