Embedded/Raspberry Pi
LED제어
Aryazoa
2022. 10. 21. 16:24
LED 일괄제어
import RPi.GPIO as GPIO
import time
GPIO.setup(GPIO.BCM)
GPIO.setwarnings(False)
pins = [16,20,21]
for pin in pins:
GPIO.setup(pin,GPIO.OUT)
try:
while True:
for i in range(len(pins)):
GPIO.output(pins[i],GPIO.HIGH)
time.sleep(1.0)
for i in range(len(pins)):
GPIO.output(pins[i],GPIO.LOW)
time.sleep(1.0)
except KeyboardInterrupt:
pass
finally:
GPIO.cleanup()
Adafruit Github사이트에서 다운로드
T Cobbler Plus Cable.fzpz
0.06MB
https://github.com/adafruit/Fritzing-Library/tree/master/parts/retired
GitHub - adafruit/Fritzing-Library: Adafruit parts, components, breakouts, etc...in Fritzable format!
Adafruit parts, components, breakouts, etc...in Fritzable format! - GitHub - adafruit/Fritzing-Library: Adafruit parts, components, breakouts, etc...in Fritzable format!
github.com