Skip to content

Instantly share code, notes, and snippets.

@bphermansson
Created March 9, 2017 10:30
Show Gist options
  • Save bphermansson/03a12f80da970c5fb92fda432cacbb7f to your computer and use it in GitHub Desktop.
Save bphermansson/03a12f80da970c5fb92fda432cacbb7f to your computer and use it in GitHub Desktop.
# Test three leds connected to Raspberry Pi Gpio.
#!/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