Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import RPi.GPIO as GPIO
- GPIO.setmode(GPIO.BOARD)
- GPIO.setup(7, GPIO.IN, pull_up_down=GPIO.PUD_UP)
- while True:
- while GPIO.input(7)==0:
- print "print a barcode ticket"
- else:
- raw_input("scan barcode here: ")
- print "do something with the value"
Add Comment
Please, Sign In to add comment