Skip to content

Instantly share code, notes, and snippets.

@xezpeleta
Created December 16, 2013 21:19
Show Gist options
  • Save xezpeleta/7994606 to your computer and use it in GitHub Desktop.
Save xezpeleta/7994606 to your computer and use it in GitHub Desktop.
RaspberryPi - Switch on a LED (pin 4) during 1 second
#! /usr/bin/python
import RPi.GPIO as GPIO
import time
LED = 4
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(LED, GPIO.OUT)
GPIO.output(LED, True)
time.sleep(1)
GPIO.output(LED, False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment