Is there a way that I can get this procedure to time-out after some user specified number of seconds -
readPassiveTargetID(uint8_t cardbaudrate, uint8_t * uid, uint8_t * uidLength)
I want to be able to do other stuff should there be no card to read.
Moderators: adafruit_support_bill, adafruit
RUInsane wrote:Is there a way that I can get this procedure to time-out after some user specified number of seconds -
readPassiveTargetID(uint8_t cardbaudrate, uint8_t * uid, uint8_t * uidLength)
I want to be able to do other stuff should there be no card to read.
scott-42 wrote:RUInsane wrote:Is there a way that I can get this procedure to time-out after some user specified number of seconds -
readPassiveTargetID(uint8_t cardbaudrate, uint8_t * uid, uint8_t * uidLength)
I want to be able to do other stuff should there be no card to read.
Yes you could modify the library code to do this. You will want to configure the MxRtyPassiveActivation field in the RFConfiguration MaxRetries before you call InListPassiveTarget. The default value (0xFF) is try forever. Then you can add in any logic you want to figure out the wait time and how many times to call InListPassiveTarget.
If you are interested in this, I would suggest you read the PN532 User Manual which has all of this information and more.
Return to Other Adafruit products
Users browsing this forum: No registered users and 4 guests