switch all leds off when exiting
This commit is contained in:
parent
dcd2ad2b09
commit
12dab7ee19
1 changed files with 7 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
|
@ -96,7 +96,10 @@ if __name__ == '__main__':
|
||||||
setConfiguredLedColor()
|
setConfiguredLedColor()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
GPIO.wait_for_edge(dummyPin, GPIO.RISING)
|
GPIO.wait_for_edge(dummyPin, GPIO.RISING)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print 'exiting'
|
||||||
finally:
|
finally:
|
||||||
GPIO.cleanup()
|
setLeds(0, 0, 0)
|
||||||
|
GPIO.cleanup()
|
||||||
|
|
Loading…
Reference in a new issue