from machine import Pin
led=Pin(23,Pin.OUT)
bt=Pin(15,Pin.IN)
while True:
if bt.value()==1:# bouton activé
led.on()
else :
led.off()
from machine import Pin
led=Pin(23,Pin.OUT)
bt=Pin(15,Pin.IN)
while True:
if bt.value()==1:# bouton activé
led.on()
else :
led.off()