def stop():
global _running
_running = False
cg.send("\nAlarm Cycles Finished\n")
cg.ifttt('PiAlarm_SendText', {'value1': 'PiAlarm Completed'})
# Cleanup tasks:
all_off.run()
GPIO.remove_event_detect(off_button)
#
# GPIO.cleanup() # Removed to avoid interference with clock
#
# release_PWM(pin_shaker)
# etc...
# # Then stop pi-blaster for good measure:
# stopPiB = "sudo kill $(ps aux | grep [b]laster | awk '{print $2}')"
# subprocess.call(stopPiB, shell=True)
评论列表
文章目录