pi-rfid-jukebox/bin/tag-reader-nfc

18 lines
320 B
Plaintext

import nxppy
import time
import sys
mifare = nxppy.Mifare()
# Print card UIDs as they are detected
while True:
try:
uid = mifare.select()
print(uid)
sys.stdout.flush()
except nxppy.SelectError:
# SelectError is raised if no card is in the field.
pass
time.sleep(1)