RFID Utility
Project description
Context
This tool is showcased in the project IotaWorkshop
Summary
This is a basic RFID libarary for the rc522. This simply lets you pull a single tag data and later lets you confirm it using the function detectKey(uid,block)
Installation
This package requires RPi.GPIO
, which I installed on arch arm using
yay -S python-raspberry-gpio
But ubuntu or rasbian can use,
pip install RPi.GPIO
To install pibeep simply install the pip package.
pip install rc522
Example
Simple example of usage
from rc522 import detect,detectKey
uid,block detect(rst=31,irq=29)
#Later you can check that the same raid tag is still there using
if detectKey(uid,block,rst=31,irq=29):
print("RFID tag is still there")
else:
print("RFID tag is vacant!")
Wiring
To connect the RC522 module to SPI use the following schematic. Use this pinout diagram for reference.
Board pin name | Board pin | Physical RPi pin | RPi pin name |
---|---|---|---|
SDA | 1 | 24 | GPIO8, CE0 |
SCK | 2 | 23 | GPIO11, SCKL |
MOSI | 3 | 19 | GPIO10, MOSI |
MISO | 4 | 21 | GPIO9, MISO |
IRQ | 29 | GPIO5 | |
GND | 6 | 6, 9, 20, 25 | Ground |
RST | 31 | GPIO6 | |
3.3V | 8 | 1,17 | 3V3 |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rc522-0.0.1.5.tar.gz
(2.5 kB
view details)
File details
Details for the file rc522-0.0.1.5.tar.gz
.
File metadata
- Download URL: rc522-0.0.1.5.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e83a93eaf7dafe907764a90d6dafd647ddb17fca3d358e050cbc3748b00d2854 |
|
MD5 | 254182faf2e4a5365a5ac24e8743371c |
|
BLAKE2b-256 | 92ed099487227212c748da7406641b9fcc1fa2a371c54f2a24ae5e0e941b6f5f |