ondryaso / pi-rc522

Raspberry Pi Python library for SPI RFID RC522 module
MIT License
411 stars 150 forks source link

Wait for card removal method #78

Open zhiyan114 opened 4 months ago

zhiyan114 commented 4 months ago

So currently, the code will continuously reading a card until it's removed, in some cases, this can be a really bad idea since the software may process the data multiple time if the card isnt removed "on time".

The current workaround is to record the last UID, but this breaks the edge case where user are allowed rescan their tag after removing the tag.

So is it possible to yield the loop until the reader no longer detect the card's field.