Beispiel #1
0
def doit():
    led.connect()

    max = 200
    for i in range(0, max):
        led.setAllLed(255*(i/max), 255, 255)
        time.sleep(0.01)
Beispiel #2
0
def run():
    led.connect()
    i = 0
    while 1 :
      led.setAllLed(i%255, 255, 255)
      i = i + 1
      if i == 1000 :
        break
Beispiel #3
0
def main():
    led.connect()
    standby_loop.start()

    parser = argparse.ArgumentParser()
    parser.add_argument('ip', help='Philips HUE bridge ip')
    parser.add_argument('--username', help='Philips HUE bridge username')
    parser.add_argument('--config', help='Path to Philips HUE bridge config file', metavar='CONFIG_PATH')
    args = parser.parse_args()

    global hue
    hue = HueController(ip=args.ip, username=args.username, config=args.config)

    try:
        while True:
            print('Listening...')
            wakeword = Wakeword(wakeword_handler, 0.4)
            wakeword.listen()
    except KeyboardInterrupt:
        print('Bye!')
        wakeword.stop()

    standby_loop.stop()
    runner.once(led.solid)
Beispiel #4
0
def init():
    led.connect()
Beispiel #5
0
def doit():
    led.connect()
    led.setLed(20, 255, 0, 0)
    led.flush()
    led.show()