from machine import Pin from time import sleep_ms Button = Pin(15, Pin.IN, Pin.PULL_UP) while(1): X = Button.value() print(X) sleep_ms(100)