changes
This commit is contained in:
parent
5426a1107f
commit
b4881aecbb
11
2_BUTTON/button_function.py
Normal file
11
2_BUTTON/button_function.py
Normal file
@ -0,0 +1,11 @@
|
||||
from gpiozero import Button
|
||||
from signal import pause
|
||||
|
||||
def say_hello():
|
||||
print("Hello!")
|
||||
|
||||
button = Button(23)
|
||||
|
||||
button.when_pressed = say_hello
|
||||
|
||||
pause()
|
Loading…
x
Reference in New Issue
Block a user