Guest User

Untitled

a guest
Jan 12th, 2014
340
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python
  2. fobj = open("/root/status.txt","r+")
  3. import RPi.GPIO as GPIO
  4. import time
  5. import sys
  6. import subprocess
  7. import os
  8. GPIO.setwarnings(False)
  9. GPIO.setmode(GPIO.BOARD)
  10. GPIO.setup(7, GPIO.OUT)
  11. status=fobj.read()
  12. while True:
  13.     rc522 = subprocess.Popen(["/root/bcm2835-1.35/rpi-rc522-read-only/rc522/rc522_reader","-d"], stdout=subprocess.PIPE)
  14.     ID=rc522.stdout.readline()
  15.     fobj.truncate()
  16.     fobj.write(ID)
  17. fobj.close()
RAW Paste Data