Skip to content

Instantly share code, notes, and snippets.

@l337quez
Created January 2, 2016 17:00
Show Gist options
  • Save l337quez/fb08de73a616877b1ded to your computer and use it in GitHub Desktop.
Save l337quez/fb08de73a616877b1ded to your computer and use it in GitHub Desktop.
blind two led in python
import RPI.GPIO as GPIO
import time
#definimos la funcion blind
def blink(pin):
GPIO.output(pin,GPIO.HIGH)
time.sleep(1)
GPIO.output(pin,GPIO.LOW)
time.sleep(1)
return
#Para usar los pines de la tarjeta Raspberry
GPIO.setmode(GPIO.BOARD)
#Configuramos el numero de los pines de salida
GPIO.setup(11, GPIO.OUT)
GPIO.setup(13, GPIO.OUT)
#Ciclo de ejecucion
for i in range (0,4)
blink(11)
blink(13)
GPIO.cleanup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment