2 import RPi.GPIO as GPIO
3 import statemachine, actor, pins, tysock, waker
5 # initialize GPIO stuff
6 GPIO.setmode(GPIO.BOARD)
9 the_actor = actor.Actor()
10 the_machine = statemachine.StateMachine(the_actor)
11 the_socket = tysock.TySocket(the_machine)
12 the_pins = pins.PinsWatcher(the_machine)
13 the_waker = waker.Waker(the_machine)
15 # we do the socket accept thing in the main thread
18 except KeyboardInterrupt:
19 # this is what we waited for!