Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.