diff --git a/NFC_Reader.py b/NFC_Reader.py index c16ece3..dd642c5 100644 --- a/NFC_Reader.py +++ b/NFC_Reader.py @@ -29,13 +29,12 @@ def onTagSense(tag): return False def start_nfc_normal(): - device = get_reader() - clf = nfc.ContactlessFrontend(device) - clf.open(device) - while True: + device = get_reader() + clf = nfc.ContactlessFrontend(device) + clf.open(device) clf.connect(rdwr={'on-connect': onTagSense, 'beep-on-connect': True }) time.sleep(0.75) - + clf.close() if __name__ == "__main__": start_nfc_normal()