📜  按钮树莓派 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:42.657000             🧑  作者: Mango

代码示例2
# One prong to GND the other to a GPIO pin

from gpiozero import Button

button = Button(GPIO pin)

button.wait_for_press()
print("button was pressed")