Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14360

Can an rfid reader capture strikes from a foam sword with cards attached?

$
0
0

I am using the PN5180 RFID reader to capture cards that will be attached to a foam sword. The issue I am having is the reader is not quick enough to capture the uid consistently. This is the code that I am using with pyPN5180 library.

from PN5180 import PN5180import sysimport timeif __name__ == '__main__':    check_debug = sys.argv[1] if len(sys.argv) == 2 else ''    debug = True if check_debug == '-v' else False    reader = PN5180(debug=debug)    while True:        cards = reader.inventory()        print(f"{len(cards)} card(s) detected: {' - '.join(cards)}")        time.sleep(.2) 

If i set time.sleep() to anything lower than .2 the cards fail to read just about every time so I imagine this is a hardware issue. If so, are there any rfid readers that can read fast enough to detect quick strikes with a foam sword. If not, is there anything else that could do this?


Viewing all articles
Browse latest Browse all 14360

Trending Articles