Created
August 15, 2017 17:25
-
-
Save joetechem/4ced486f0958e7ce85c67c9eeb29f730 to your computer and use it in GitHub Desktop.
LED2.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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