Go to file
2021-05-01 11:18:03 +01:00
.vscode first commit 2021-05-01 11:18:03 +01:00
mfrc522 first commit 2021-05-01 11:18:03 +01:00
.gitignore first commit 2021-05-01 11:18:03 +01:00
allmp3.py first commit 2021-05-01 11:18:03 +01:00
interval.py first commit 2021-05-01 11:18:03 +01:00
jfsgpio.py first commit 2021-05-01 11:18:03 +01:00
jfsread.py first commit 2021-05-01 11:18:03 +01:00
jfswrite.py first commit 2021-05-01 11:18:03 +01:00
joystick.py first commit 2021-05-01 11:18:03 +01:00
LICENSE first commit 2021-05-01 11:18:03 +01:00
loud.txt first commit 2021-05-01 11:18:03 +01:00
muttiOne.py first commit 2021-05-01 11:18:03 +01:00
README.md first commit 2021-05-01 11:18:03 +01:00
setup.py first commit 2021-05-01 11:18:03 +01:00
Sound1a.py first commit 2021-05-01 11:18:03 +01:00
soundplayer.py first commit 2021-05-01 11:18:03 +01:00
testgpio.py first commit 2021-05-01 11:18:03 +01:00

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