I found a 'solution' to this problem. I needed to read more than two tags at the same time, and while searching I found that we can 'hold' tags. When you hold a tag, you're just telling him "Do not answer anymore until you leave my range and enter again", so if you use the hold command immediately after reading each tag, you can read lot's of tags "at the same time".
To do that, I added these lines at the end of the readPassiveTargetID
function in the nfc arduino library:
- Code: Select all
// Test to deselect the last read tag
bTestDeselect = PN532_COMMAND_INDESELECT;
bTestDeselect = pn532_packetbuffer;
Serial.print("Tried to disable tag");
The code is far from being complete, but it worked as a proof of concept. I dropped five tags on the shield, and it gave me five different id's (but only once, since you told the tags to stop answering after the first read). After holding a tag, you can even unhold it, with it's id, but I didn't explore that functions (yet). If someone does something interesting with this, please let me know!
Paulo (yes, my name it's the same as OP!)