Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@li2hub
Created October 23, 2018 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save li2hub/6a6014f611def81d042a57933088dbc2 to your computer and use it in GitHub Desktop.
Save li2hub/6a6014f611def81d042a57933088dbc2 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(18,GPIO.OUT)
print "LED on"
GPIO.output(18,GPIO.HIGH)
time.sleep(1)
print "LED off"
GPIO.output(18,GPIO.LOW)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment