2 import RPi.GPIO as GPIO
3 import statemachine, actor, pins, tysock, waker
4 from libtuer import logger
6 # initialize GPIO stuff
7 GPIO.setmode(GPIO.BOARD)
10 the_actor = actor.Actor()
11 the_machine = statemachine.StateMachine(the_actor)
12 the_socket = tysock.TySocket(the_machine)
13 the_pins = pins.PinsWatcher(the_machine)
14 the_waker = waker.Waker(the_machine)
16 # we do the socket accept thing in the main thread
19 except KeyboardInterrupt:
20 # this is what we waited for!
21 logger.info("Got SIGINT, terminating...")