NFC Reader disconect

This commit is contained in:
bton 2024-07-03 17:50:45 +02:00
parent 949ef395dc
commit 1cd92e1e21

View file

@ -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__":