from machine import Pin
from time import sleep
bouton= Pin (14 ,Pin.IN,Pin.PULL_DOWN )
led =Pin (2 , Pin.OUT )
while True:
print (bouton .value() )
if bouton.value() ==1:
led.on()
else:
led.off()
from machine import Pin
from time import sleep
bouton= Pin (14 ,Pin.IN,Pin.PULL_DOWN )
led =Pin (2 , Pin.OUT )
while True:
print (bouton .value() )
if bouton.value() ==1:
led.on()
else:
led.off()