Read Tag
Hello! As I can do to read different tags at once, without having to restart the program ??
My program is:
import nfc.ndef
def connected(tag):
print(
if __name__ == "__main__":
clf = nfc.Contactless
print clf
clf.
clf.close()
THANKSS!!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- nfcpy Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Rafael
- Solved:
- 2016-09-16
- Last query:
- 2016-09-16
- Last reply:
- 2016-09-16
Basically you'll need to loop around clf.connect(). If the connected() function returns True, then clf.connect() will only return when the tag is removed. It returns True unless you press Ctrl-C to send a keyboard interrupt.
import nfc
def connected(tag):
print(tag)
if tag.ndef:
return True
clf = nfc.Contactless
while clf.connect(
print("waiting for tag")
clf.close()
Rafael (hibara94) said : | #2 |
Thank you very much!!