This commit is contained in:
2026-03-21 10:53:02 +01:00
parent 3a6c07513c
commit ccfeb6f2c1
1997 changed files with 361936 additions and 0 deletions

22
flask/bouton.py Normal file
View File

@@ -0,0 +1,22 @@
from time import *
from gpiozero import *
from signal import pause
def led ():
print ('led allumé')
"""
print("One button to turn on or off")
led = LED(17)
btn = Button(20, bounce_time=None)
while True:
print('turn on')
led.on()
sleep(0.2) # to avoid bouncing
btn.wait_for_press()
print('turn off')
led.off()
sleep(0.2) # to avoid bouncing
btn.wait_for_press()
"""