Move RFID comment block
Put it with the RFID loop, to make it obvious where RFID stuff happens. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
4b3d5282ae
commit
4b8b596ae3
25
doors.py
25
doors.py
|
@ -71,19 +71,6 @@ def close_door():
|
|||
|
||||
|
||||
import time
|
||||
#python-pyserial package. Not sure we need this. Grabbed based on
|
||||
#http://allenmlabs.blogspot.se/2013/01/raspberry-pi-parallax-rfid-reader.html
|
||||
import serial
|
||||
######################
|
||||
# #
|
||||
# Set up RFID Reader #
|
||||
# #
|
||||
######################
|
||||
|
||||
RFID_SERIAL = serial.Serial(RFID_PATH, 2400, timeout=1)
|
||||
|
||||
|
||||
|
||||
from urllib import request
|
||||
#############################################
|
||||
# #
|
||||
|
@ -100,6 +87,18 @@ def verify_key(key):
|
|||
close_door()
|
||||
|
||||
|
||||
|
||||
#python-pyserial package. Not sure we need this. Grabbed based on
|
||||
#http://allenmlabs.blogspot.se/2013/01/raspberry-pi-parallax-rfid-reader.html
|
||||
import serial
|
||||
###################
|
||||
# #
|
||||
# Run RFID Reader #
|
||||
# #
|
||||
###################
|
||||
|
||||
RFID_SERIAL = serial.Serial(RFID_PATH, 2400, timeout=1)
|
||||
|
||||
while True:
|
||||
string = RFID_SERIAL.read(12)
|
||||
if len(string) == 0:
|
||||
|
|
Loading…
Reference in New Issue