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()
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)