RileyProjects/2_BUTTON/button_function.py
2019-11-10 10:28:02 +00:00

12 lines
154 B
Python

from gpiozero import Button
from signal import pause
def say_hello():
print("Hello!")
button = Button(23)
button.when_pressed = say_hello
pause()