from mfrc522 import MFRC522
from time import sleep
reader = MFRC522(spi_id=0, sck=18, mosi=19, miso=16, cs=17, rst=9)
while True:
print("Place the card...")
stat, tag_type = reader.request(reader.REQIDL)
if stat == reader.OK:
stat, uid = reader.anticoll()
if stat == reader.OK:
print("UID:", uid)
sleep(1)