Skip to content

Instantly share code, notes, and snippets.

@joetechem
Created August 15, 2017 17:25
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 joetechem/4ced486f0958e7ce85c67c9eeb29f730 to your computer and use it in GitHub Desktop.
Save joetechem/4ced486f0958e7ce85c67c9eeb29f730 to your computer and use it in GitHub Desktop.
LED2.py
import RPi.GPIO as GPIO
DEBUG = 1
GPIO.setmode(GPIO.BCM)
GREEN_LED = 4
RED_LED = 5
BLUE_LED = 26
GPIO.setup(GREEN_LED, GPIO.OUT)
GPIO.setup(RED_LED, GPIO.OUT)
GPIO.setup(BLUE_LED, GPIO.OUT)
def green_led(state):
GPIO.output(GREEN_LED,state)
def red_led(state):
GPIO.output(RED_LED,state)
def blue_led(state):
GPIO.output(BLUE_LED,state)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment