Skip to content

Instantly share code, notes, and snippets.

@TheB1ackSheep
Created March 15, 2014 17:46
Show Gist options
  • Save TheB1ackSheep/9571104 to your computer and use it in GitHub Desktop.
Save TheB1ackSheep/9571104 to your computer and use it in GitHub Desktop.
import RPi.GPIO as gpio
pin_st = 7
pin_nd = 11
gpio.setmode(gpio.BOARD)
gpio.setup(pin_st, gpio.OUT)
gpio.setup(pin_nd, gpio.OUT)
while 1:
data = raw_input("Enter 2-bit's lenght -> ")
if(len(data) == 2):
gpio.output(pin_st,int(data[0]))
gpio.output(pin_nd,int(data[1]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment