From ac0ae47eae033fe52778b85c43d4d1bb557efbde Mon Sep 17 00:00:00 2001 From: Stefan Date: Mon, 24 Dec 2018 18:15:08 +0100 Subject: [PATCH] fix blocking when tag is on the reader for some time, fix was taken from calvinzirk/pi-rc522 --- pirc522/rfid.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pirc522/rfid.py b/pirc522/rfid.py index bc00ea2..ce372eb 100644 --- a/pirc522/rfid.py +++ b/pirc522/rfid.py @@ -395,6 +395,11 @@ def wait_for_tag(self): # wait for it waiting = True while waiting: + self.init() + #self.irq.clear() + self.dev_write(0x04, 0x00) + self.dev_write(0x02, 0xA0) + self.dev_write(0x09, 0x26) self.dev_write(0x01, 0x0C) self.dev_write(0x0D, 0x87)