Skip to content

Instantly share code, notes, and snippets.

@polishdeveloper
Last active March 15, 2018 00:00
Show Gist options
  • Save polishdeveloper/b19884b2581d4aee221fe3fa36837e0a to your computer and use it in GitHub Desktop.
Save polishdeveloper/b19884b2581d4aee221fe3fa36837e0a to your computer and use it in GitHub Desktop.
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(21,GPIO.OUT)
for i in range(5):
print "LED on"
GPIO.output(21,GPIO.HIGH)
time.sleep(1)
print "LED off"
GPIO.output(21,GPIO.LOW)
GPIO.cleanup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment