Skip to content

Instantly share code, notes, and snippets.

@yohanes
Created January 28, 2016 06:54
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 yohanes/530d29edb4f447bb9c1a to your computer and use it in GitHub Desktop.
Save yohanes/530d29edb4f447bb9c1a to your computer and use it in GitHub Desktop.
Switch a button
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
PIN=18
GPIO.setup(PIN, GPIO.OUT)
GPIO.output(PIN, 1)
time.sleep(0.1)
GPIO.output(PIN, 0)
GPIO.cleanup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment