You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you terminate alarmd.py or keypadd.py with Ctrl+C or Ctrl+Z and then relauch you will see that the GPIO channels cannot be reopened because they are already in use. My solution was to add
include signal
include sys
... and just before the "while True:" ...
def signal_handler(signal, frame):
print '[EXIT] You have just terminated the script execution!'
io.cleanup()
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
Change "io.cleanup()" to "GPIO.cleanup()" in order to use it in keypadd.py.
The text was updated successfully, but these errors were encountered:
If you terminate alarmd.py or keypadd.py with Ctrl+C or Ctrl+Z and then relauch you will see that the GPIO channels cannot be reopened because they are already in use. My solution was to add
... and just before the "while True:" ...
Change "io.cleanup()" to "GPIO.cleanup()" in order to use it in keypadd.py.
The text was updated successfully, but these errors were encountered: