Created
February 18, 2014 14:13
-
-
Save robhinds/9071754 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 the package to control GPIO | |
| import RPi.GPIO as GPIO | |
| # Set mode to BCM - this allows us to reference pins by numbers labelled on the cobbler, not just the normal pin number | |
| GPIO.setmode(GPIO.BCM) | |
| # we connected out light to pin labelled 23, so we will store that so we can easily reference it | |
| GREEN_LED = 23 | |
| # Setup and turn on the green light | |
| GPIO.setup(GREEN_LED, GPIO.OUT) | |
| GPIO.output(GREEN_LED, True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment