Srxon05

dioda

May 15th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. import RPi.GPIO as GPIO
  2. import time
  3. GPIO.setmode(GPIO.BCM)
  4. GPIO.setwarnings(False)
  5. crvena=18
  6. GPIO.setup(crvena, GPIO.OUT)
  7. try:
  8.     while(True):
  9.         GPIO.output(crvena, GPIO.HIGH)#Ovde palimo crvenu diodu
  10.         time.sleep(0.5)
  11.         GPIO.output(crvena,GPIO.LOW)
  12.         time.sleep(0.5)
  13. except KeyboardInterrupt:
  14.         GPIO.cleanup()
Advertisement
Add Comment
Please, Sign In to add comment