from machine import Pin, Signal
import time
led_pin = Pin(19, Pin.OUT, Pin.PULL_UP)
led_pin1 = Pin(35, Pin.IN, Pin.PULL_UP)
# 直接使用pin
while True:
value_key35=led_pin1.value()
print(!value_key35)
led_pin.value(!value_key35) # 也可以写 led_pin.off()