예제 #1
0
def device_once_test():
    pibo = Edu_Pibo()
    print('확인할 device를 입력하세요.(system, battery) (q: 종료)')

    while True:
        cmd = input("")
        if cmd == "q":
            break
        ret = pibo.check_device(cmd)
        print(ret)
예제 #2
0
    return len(faces)


def device(msg):
    LOG_PRINT('{}: {}'.format(sys._getframe(0).f_code.co_name, msg))

    if "person" in msg["PIR"]:
        if check_person() > 0:
            listen()


if __name__ == "__main__":
    LOG_PRINT("Start")
    pibo = Edu_Pibo()
    LOG_PRINT("Init ...")

    pibo.draw_image(cfg.TESTDATA_PATH + "/icon/pibo_logo.png")
    pibo.show_display()

    play_tts("안녕! 난 파이보야.")
    pibo.set_motion("welcome", 1)
    pibo.set_motion("stop", 1)

    LOG_PRINT("Device Start ...")

    while True:
        _, res = pibo.check_device("system")
        device(res)
        time.sleep(1)