# importer Pin du module machine,et sleep du module utime
from machine import Pin
from utime import sleep
pin_button = Pin(2, mode=Pin.IN, pull=Pin.PULL_DOWN)
pin_led = Pin(15, mode=Pin.OUT)
while True:
  if pin_button.value() == 1:
    pin_led.value(True)
  else:
    pin_led.value(False)
  sleep(0.2)