|
本帖最后由 15588608145 于 2018-8-5 01:27 编辑
from machine import Pin
from time import sleep_ms
def led_toggle(t):
LED = Pin(t, Pin.OUT)
if LED.value() == 1:
LED(0) # off
return(LED.value())
#sleep_ms(100)
elif LED.value() == 0:
LED(1) # on
return(LED.value())
#sleep_ms(100)
|
|