Created
March 9, 2017 10:30
-
-
Save bphermansson/03a12f80da970c5fb92fda432cacbb7f to your computer and use it in GitHub Desktop.
# Test three leds connected to Raspberry Pi Gpio.
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
#!/usr/bin/env python | |
# Test three leds connected to Raspberry Pi Gpio. | |
import RPi.GPIO as GPIO | |
from time import sleep | |
# Setup Gpio | |
GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BOARD) # Use actual pin numbers on the board | |
GPIO.setup(32, GPIO.OUT) | |
GPIO.setup(36, GPIO.OUT) | |
GPIO.setup(38, GPIO.OUT) | |
GPIO.output(32, 1) | |
sleep(1) | |
GPIO.output(36, 1) | |
sleep(1) | |
GPIO.output(38, 1) | |
sleep(1) | |
GPIO.output(38, 0) | |
sleep(1) | |
GPIO.output(36, 0) | |
sleep(1) | |
GPIO.output(32, 0) | |
sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment