2
我试图让每一秒闪烁一次led。这是我的代码:覆盆子pi不闪烁
import RPi.GPIO as gpio
try:
while True:
gpio.output(20, 1)
time.sleep(1)
gpio.output(20, 0)
except KeyboardInterrupt:
gpio.cleanup()
问题是,我的LED只是打开,它不闪烁。