diff --git a/NFC_Reader.py b/NFC_Reader.py index a5ae30d..875bb66 100644 --- a/NFC_Reader.py +++ b/NFC_Reader.py @@ -19,7 +19,7 @@ def onTagSense(tag): response = requests.post(f"{url}tag_id", data={"id":id}) print(response.json()) try: - if response.json()["mode"] == "balance": + if response.json()["mode"] == "balance" or response.json()["mode"] == "message": return True except: None @@ -32,6 +32,7 @@ def start_nfc_normal(): while True: clf.connect(rdwr={'on-connect': onTagSense, 'beep-on-connect': True }) time.sleep(0.75) + if __name__ == "__main__": start_nfc_normal()