라즈베리파이 LED예제
2019. 9. 5. 11:27
Programing/Raspberry Pi)
import RPi.GPIO as gpio
import time
import sys
import warnings
warnings.filterwarnings('ignore')
LED = 4
if __name__ == '__main__' :
gpio.setmode(gpio.BCM)
gpio.setup(LED, gpio.OUT)
try:
while True:
gpio.output(LED, gpio.HIGH)
time.sleep(1)
gpio.output(LED, gpio.LOW)
time.sleep(1)
except KeyboardInterrupt:
gpio.cleanup()
sys.exit()
'Programing > Raspberry Pi)' 카테고리의 다른 글
Raspberry Pi - OpenCV 설치 (0) | 2019.12.23 |
---|---|
TCP Rasspberry Pi Python and Android Client (0) | 2019.09.21 |
라즈베리파이, LED와 초음파센서 DB저장 (0) | 2019.09.07 |
라즈베리파이 Python [초음파센서, LED. 접근하면 Right On] (0) | 2019.09.05 |
라즈베리파이 Ultra 예제 (0) | 2019.09.05 |