Update main.py
This commit is contained in:
1 parent
8f00a5a941
commit
e336c071bf
1 file changed
+5
@@ -56,7 +56,12 @@ def bugmotion():
|
|||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
print("\nSystem Ready!")
|
print("\nSystem Ready!")
|
||||||
|
|
||||||
|
def exit_handler():
|
||||||
|
print('Program Shutting Down!')
|
||||||
|
GPIO.output(22, 0) # turns off LED
|
||||||
|
|
||||||
bugmotion() #Starts Program
|
bugmotion() #Starts Program
|
||||||
|
atexit.register(exit_handler)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user