Skip to content

Instantly share code, notes, and snippets.

@agusmakmun
Created May 2, 2015 16:21
Show Gist options
  • Save agusmakmun/418a5d63086191e6a4e0 to your computer and use it in GitHub Desktop.
Save agusmakmun/418a5d63086191e6a4e0 to your computer and use it in GitHub Desktop.
Raspberry Pi: GPIO LED on & off
#!/usr/bin/python
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.cleanup()
GPIO.setwarning(False)
GPIO.setup(17, GPIO.OUT)
GPIO.setup(27, GPIO.OUT)
print "Light On"
GPIO.output(17, GPIO.HIGH)
GPIO.output(27, GPIO.HIGH)
#more: http://python.web.id/raspberry-pi-gpio-led-on-off/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment