wehlutyk / MFRC522-python

Library utilized for Pi My Life Up's guide on setting up an RFID RC522 reader.

Home Page:https://pimylifeup.com/raspberry-pi-rfid-rc522/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mfrc522

A python library to read/write RFID tags via the budget MFRC522 RFID module.

This code was published in relation to a blog post and you can find out more about how to hook up your MFRC reader to a Raspberry Pi there.

Installation

Until the package is on PyPi, clone this repository and run python setup.py install in the top level directory.

Example Code

The following code will read a tag from the MFRC522

from time import sleep
import sys
from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()

while True:
    print("Hold a tag near the reader")
    id, text = reader.read()
    print("ID: %s\nText: %s" % (id,text))
    sleep(5)

About

Library utilized for Pi My Life Up's guide on setting up an RFID RC522 reader.

https://pimylifeup.com/raspberry-pi-rfid-rc522/

License:GNU Lesser General Public License v3.0


Languages

Language:Python 100.0%