Ejemplo n.º 1
0
def text_test():
    pibo = Edu_Pibo()

    ret = pibo.draw_text((10, 10), '안녕하세요. Hello', 15)
    print(ret)
    pibo.show_display()
    time.sleep(2)
    pibo.clear_display()
Ejemplo n.º 2
0
def image_test():
    pibo = Edu_Pibo()

    ret = pibo.draw_image(cfg.TESTDATA_PATH + "/clear.png")
    print(ret)
    pibo.show_display()
    time.sleep(2)
    pibo.clear_display()
Ejemplo n.º 3
0
def figure_test():
    pibo = Edu_Pibo()
    pibo.draw_figure((10, 10, 30, 30), "rectangle", True)
    pibo.draw_figure((70, 40, 90, 60), "circle", False)
    pibo.draw_figure((15, 15, 80, 50), "line")
    pibo.show_display()
    time.sleep(1.5)

    pibo.invert()
    pibo.show_display()
    time.sleep(1.5)
    pibo.clear_display()
Ejemplo n.º 4
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)