📅  最后修改于: 2022-03-11 14:58:11.997000             🧑  作者: Mango
import time
from machine import Pin
redLED = Pin("P8", mode=Pin.OUT) #Make GPIO P8 an output
redLED.value(1) # Send a 1 to GPIO to turn the LED on
time.sleep(1) # Sleep for a second
redLED.value(0) # Send a 0 to the GPIO to turn the LED off