From 1cd92e1e2128d3366eeaaac4e6184f34029af71c Mon Sep 17 00:00:00 2001 From: bton Date: Wed, 3 Jul 2024 17:50:45 +0200 Subject: [PATCH] NFC Reader disconect --- NFC_Reader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NFC_Reader.py b/NFC_Reader.py index 4b046c3..b2c5dfe 100644 --- a/NFC_Reader.py +++ b/NFC_Reader.py @@ -33,7 +33,8 @@ def start_nfc_normal(): clf = nfc.ContactlessFrontend(device) clf.open(device) while True: - clf.connect(rdwr={'on-connect': onTagSense, 'beep-on-connect': True }) + if clf.connect(rdwr={'on-connect': onTagSense, 'beep-on-connect': True }) == False: + raise Exception("NFC Reader failed") time.sleep(0.75) if __name__ == "__main__":