Skip to main content

A library to integrate the MFRC522 RFID readers with the Raspberry Pi

Project description

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()

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mfrc522-0.0.7-py2-none-any.whl (18.6 kB) Copy SHA256 hash SHA256 Wheel py2
mfrc522-0.0.7-py3-none-any.whl (18.6 kB) Copy SHA256 hash SHA256 Wheel py3
mfrc522-0.0.7.tar.gz (5.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page