Skip to content

Commit

Permalink
Reduced to a basic clock service
Browse files Browse the repository at this point in the history
  • Loading branch information
hexascroller committed Mar 28, 2013
1 parent 8863702 commit bf7f15b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions hexaservice/service.py
Expand Up @@ -2,19 +2,26 @@
import led_panel
from led_panel import panels
import time
import signal
import sys

class ServiceThread:
pass

if __name__=="__main__":
led_panel.init()

panels[0].setRelay(True)

for i in range(100):
def sigint_handler(signal,frame):
print("Caught ctrl-C; shutting down.")
panels[0].setRelay(False)
led_panel.shutdown()
sys.exit(0)
signal.signal(signal.SIGINT,sigint_handler)
while True:
msg = time.strftime("%H:%M:%S")
for j in range(3):
panels[j].setMessage("Test:"+str(i),i,0)
time.sleep(0.333)
panels[j].setMessage(msg,0,0)
time.sleep(0.15)

panels[0].setRelay(False)

Expand Down

0 comments on commit bf7f15b

Please sign in to comment.