mxgxw / MFRC522-python

A small class to interface with the NFC reader Module MFRC522
GNU Lesser General Public License v3.0
521 stars 419 forks source link

Limiting from Continuous Scanning #53

Open mprythero opened 6 years ago

mprythero commented 6 years ago

I was curious if there was a way to limit the read script from a continuous scan to limit a scan recognition to every five seconds or even a minute. I've just noticed that if I hover an RFID card over the sensor that it will continue to read until I swipe it away. And sometimes if it's a fast swipe, it could still read two or three times.

Is there a way to fix this or does anyone have any suggestions? Thanks~ Matt

Jbithell commented 6 years ago

It sounds like you are more after scanning continually, but not reading a specific card more than once per a certain time interval, instead of actually stopping/starting a scan?

cscuilla commented 3 years ago

make it sleep for a second after detecting a card.. time.sleep(1)