|
|
|
@ -77,11 +77,13 @@ def main():
|
|
|
|
|
while True: |
|
|
|
|
#pdb.set_trace() |
|
|
|
|
update_reading() |
|
|
|
|
except KeyboardInterrupt: |
|
|
|
|
print("Keyboard Interrupt: quitting program.") |
|
|
|
|
except: |
|
|
|
|
print("Error updating light reading.") |
|
|
|
|
print("Error updating light reading...") |
|
|
|
|
finally: |
|
|
|
|
print("clean up") |
|
|
|
|
GPIO.cleanup() # cleanup all GPIO |
|
|
|
|
print("Cleaning up GPIO before closing...") |
|
|
|
|
GPIO.cleanup() |
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
|
main() |
|
|
|
|