Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import RPi.GPIO as GPIO
- import time
- led_pin = 17
- GPIO.setmode(GPIO.BCM)
- GPIO.setup(led_pin,GPIO.OUT)
- print "\nlinker led pin 17\n"
- while True:
- try:
- GPIO.output(led_pin,True)
- time.sleep(0.5)
- GPIO.output(led_pin,False)
- time.sleep(0.5)
- except KeyboardInterrupt:
- GPIO.output(led_pin,False)
- GPIO.cleanup() # Clean up GPIO on CTRL+C exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement