Created
February 11, 2018 13:06
-
-
Save abdul-rehman-2050/e268b2b216033f90781b1c1818d7b1d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO | |
import time | |
#global veriables | |
LED_Pin = 16 | |
delay = 0.5 | |
#setup your pins and GPIO mode | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(LED_Pin,GPIO.OUT) | |
#your main code | |
for i in range(1,50): | |
GPIO.output(LED_Pin,GPIO.HIGH) | |
time.sleep(0.5) | |
GPIO.output(LED_Pin,GPIO.LOW) | |
time.sleep(0.5) | |
#finally clear everything once code is about to finish | |
GPIO.cleanup() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment