Google Assistant SDK 示例要求用户在与 Google Assistant 交谈之前按 Enter。
我想知道有没有办法将一个按钮连接到一个 RPI GPIO 引脚并让它触发 G.Assistant。
while True:
if wait_for_user_trigger:
click.pause(info='Press Enter to send a new request...')
continue_conversation = assistant.converse()
# wait for user trigger if there is no follow-up turn in
# the conversation.
wait_for_user_trigger = not continue_conversation
# If we only want one conversation, break.
if once and (not continue_conversation):
break
我想这将是我进行更改链接 GPIO 库的区域。
我应该如何实施它?我是 Python 和 Raspberry Pi 的新手。我确实有 Java 背景和自动化历史。