Last active
June 2, 2016 13:50
-
-
Save lesp/8fd8d101d292ff113640b3f342a4ba4b to your computer and use it in GitHub Desktop.
Example code to show how to flash an LED attached to pin 17 on a Raspberry Pi
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 time | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BCM) | |
LED = 17 | |
GPIO.setup(LED, GPIO.OUT) | |
while True: | |
GPIO.output(LED, True) | |
time.sleep(1) | |
GPIO.output(LED, False) | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment