티스토리 뷰

 

import RPi.GPIO as GPIO
import time
LED_PIN = 26
GPIO.setmode(GPIO.BCM)
GPIO.setup(LED_PIN, GPIO.OUT)
try:
    while True:
        GPIO.output(LED_PIN, GPIO.HIGH)
        time.sleep(1)
        GPIO.output(LED_PIN, GPIO.LOW)
        time.sleep(1)
except KeyboardInterrupt:
    GPIO.cleanup()

 

 

'오픈 하드웨어 > 라즈베리파이' 카테고리의 다른 글

raspberry pi 4에 kafa 설치  (0) 2023.06.15
picamera 활성화  (0) 2023.05.31
Raspberry Pi GPIO Default 상태  (0) 2023.05.31
Connect Flask with Raspberry Pi GPIO  (0) 2023.05.30
Flask Web Server 생성 및 접속  (0) 2023.05.29