Created
November 3, 2014 21:03
-
-
Save IkarosKappler/c50dbf62a2e4c8948bc0 to your computer and use it in GitHub Desktop.
A test script to let an LED blink on your RaspberryPi (pin 11).
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
# date 2014-11-03 | |
# A test script to let an LED blink on your RaspberryPi (pin 11). | |
# | |
# To use the RPi.GPIO module just install python-rpi.gpio package. | |
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup( 11, GPIO.OUT ); | |
try: | |
while True: | |
GPIO.output( 11, True ) | |
time.sleep( 2 ) | |
GPIO.output( 11, False ) | |
time.sleep( 2 ) | |
except KeyboardInterrupt: | |
GPIO.cleanup() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment