RileyProjects/2_BUTTON/button_turnOnLED.py

12 lines
165 B
Python
Raw Normal View History

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