RC522 RFID Reader Module with Raspberry Pi Pico

PHOTO EMBED

Wed Apr 13 2022 14:12:35 GMT+0000 (Coordinated Universal Time)

Saved by @ehraz786 #python

from mfrc522 import MFRC522
import utime

reader = MFRC522(spi_id=0,sck=2,miso=4,mosi=3,cs=1,rst=0)

print("Bring TAG closer...")
print("")


while True:
    reader.init()
    (stat, tag_type) = reader.request(reader.REQIDL)
    if stat == reader.OK:
        (stat, uid) = reader.SelectTagSN()
        if stat == reader.OK:
            card = int.from_bytes(bytes(uid),"little",False)
            print("CARD ID: "+str(card))
utime.sleep_ms(500) 
content_copyCOPY

Read tag value

https://microcontrollerslab.com/raspberry-pi-pico-rfid-rc522-micropython/