#我是註解

from machine import Pin#控制 ESP32的 GPIO腳需從 machine 模組匯入 Pin 類別

from time import sleep#控制 ESP32的 GPIO腳需從 time 模組匯入 sleep 類別

led=Pin(2, Pin.OUT)#設定led變數賦值為GPIO第2腳位為輸出

delay=0.25 #設定delay變數賦值為延遲時間為0.25秒


# Main loop: Repeat the forever...
while True:
    led.on() # turn on the LED
    sleep(delay) # leave it on for 1/4 second
    led.off()  # Turn off the LED
    sleep(delay) # leave it off for 1/2 second