15 if time.time() - last_time < 3:
17 last_time = time.time()
18 led = random.randint(0, 6)
19 tilt = random.randint(0, 30)
20 freenect.set_led(dev, led)
21 freenect.set_tilt_degs(dev, tilt)
22 print(
'led[%d] tilt[%d] accel[%s]' % (led, tilt, freenect.get_accel(dev)))
26 """Sets up the kill handler, catches SIGINT""" 29 print(
'Press Ctrl-C in terminal to stop')
30 signal.signal(signal.SIGINT, handler)
31 freenect.runloop(body=body)
def handler(signum, frame)