Read indefinately
This commit is contained in:
parent
dbb3a7c93e
commit
af2ec31403
|
@ -11,7 +11,7 @@ MIFAREReader = MFRC522.MFRC522()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Scan for cards
|
# Scan for cards
|
||||||
(status,TagType) = MIFAREReader.MFRC522_Request(MIFAREReader.PICC_REQIDL)
|
(status,TagType) = MIFAREReader.MFRC522_Request(MIFAREReader.PICC_REQIDL)
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,20 +20,21 @@ MIFAREReader = MFRC522.MFRC522()
|
||||||
|
|
||||||
|
|
||||||
# If we have the UID, continue
|
# If we have the UID, continue
|
||||||
if status == MIFAREReader.MI_OK:
|
while status != MIFAREReader.MI_OK:
|
||||||
|
|
||||||
# Print UID
|
# Scan for cards
|
||||||
suid = str(hex(uid[0]))[2:];
|
(status,TagType) = MIFAREReader.MFRC522_Request(MIFAREReader.PICC_REQIDL)
|
||||||
suid += '-' + str(hex(uid[1]))[2:];
|
|
||||||
suid += '-' + str(hex(uid[2]))[2:];
|
|
||||||
suid += '-' + str(hex(uid[3]))[2:];
|
|
||||||
|
|
||||||
print suid;
|
# Get the UID of the card
|
||||||
|
(status,uid) = MIFAREReader.MFRC522_Anticoll()
|
||||||
|
|
||||||
exit(0);
|
|
||||||
|
|
||||||
else:
|
# Print UID
|
||||||
|
suid = str(hex(uid[0]))[2:];
|
||||||
|
suid += '-' + str(hex(uid[1]))[2:];
|
||||||
|
suid += '-' + str(hex(uid[2]))[2:];
|
||||||
|
suid += '-' + str(hex(uid[3]))[2:];
|
||||||
|
|
||||||
print 127;
|
print suid;
|
||||||
exit(127);
|
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
|
Loading…
Reference in New Issue