Guest User

Untitled

a guest
Mar 21st, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. import RPi.GPIO as GPIO
  2. GPIO.setmode(GPIO.BOARD)
  3. GPIO.setup(7, GPIO.IN, pull_up_down=GPIO.PUD_UP)
  4. while True:
  5. while GPIO.input(7)==0:
  6. print "print a barcode ticket"
  7. else:
  8. raw_input("scan barcode here: ")
  9. print "do something with the value"
Add Comment
Please, Sign In to add comment