pi-rc522 icon indicating copy to clipboard operation
pi-rc522 copied to clipboard

Add timeout to wait_for_tag method

Open jo-me opened this issue 4 years ago • 2 comments

Based on @tlongeri 's suggestion in https://github.com/ondryaso/pi-rc522/issues/44 I addded the timeout functionality to the wait_for_tag method so that it will return after a given number of seconds. The timeout param is optional with default value of 0 (=no timeout) so that existing users of the library will not have any change in functionality unless they provide the new param.

This functionality is useful for detecting that the reader could not find a RFID tag, e.g. the card was removed.

jo-me avatar Jun 17 '20 18:06 jo-me

You're right. I updated the code to handle that case.

jo-me avatar May 04 '21 18:05 jo-me

Hi how do I use this in my code?

Jonathan-0101 avatar Sep 04 '21 17:09 Jonathan-0101