ラズベリーパイ4B

https://shumeipai.nxez.com/
https://projects.raspberrypi.org/en/pathways/getting-started-with-raspberry-pi
gpiozeroライブラリ:https://gpiozero.readthedocs.io/en/stable/

from gpiozero import LED
from time import sleep

led=LED(25)
while True:
    led.on()
    sleep(1)
    led.off()
    sleep(1)

おすすめ

転載: www.cnblogs.com/holaworld/p/12417334.html