Skip to content

Commit

Permalink
Read example now loops until Ctrl-C is caught.
Browse files Browse the repository at this point in the history
  • Loading branch information
mxgxw committed Jul 19, 2014
1 parent 9129dad commit 8ddc994
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Read.py
Expand Up @@ -20,6 +20,10 @@ def end_read(signal,frame):
# Create an object of the class MFRC522
MIFAREReader = MFRC522.MFRC522()

# Welcome message
print "Welcome to the MFRC522 data read example"
print "Press Ctrl-C to stop."

# This loop keeps checking for chips. If one is near it will get the UID and authenticate
while continue_reading:

Expand Down Expand Up @@ -55,5 +59,3 @@ def end_read(signal,frame):
else:
print "Authentication error"

# Make sure to stop scanning for cards
continue_reading = False

0 comments on commit 8ddc994

Please sign in to comment.