【发布时间】:2019-12-22 14:54:11
【问题描述】:
如何在按下按钮时在 python 中将布尔变量设置为True,以便每次按下按钮时我都可以让 python 程序执行一些操作。
if button_pressed:
print('button was pressed')
【问题讨论】:
标签: python python-3.x button arduino boolean
如何在按下按钮时在 python 中将布尔变量设置为True,以便每次按下按钮时我都可以让 python 程序执行一些操作。
if button_pressed:
print('button was pressed')
【问题讨论】:
标签: python python-3.x button arduino boolean
我猜你应该在你的 python 脚本中连接按钮的引脚。
也许this medium article 可以帮到你!
【讨论】: