📅  最后修改于: 2022-03-11 14:45:42.657000             🧑  作者: Mango
# 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")