Allows multiple RFID-RC522 modules to be connected with each triggering their own relays. Based on pi-rc522 who has nailed the IRQ await that allows for lower cpu usage while waiting for a tag. I only modified the code to allow for multiple reads and not for writing or anything else
Connecting RC522 module to SPI is pretty easy. You can use this neat website for reference.
Board pin name | RPi pin name | Extra info |
---|---|---|
SDA | GPIO8, CE0 | MUST BE A SPI PORT (CE0/CE1) |
SCK | GPIO11, SCKL | All RC522 share this pin |
MOSI | GPIO10, MOSI | All RC522 share this pin |
MISO | GPIO9, MISO | All RC522 share this pin |
IRQ | GPIO24 | |
GND | Ground | |
RST | GPIO25 | |
3.3V | 3V3 |
Board pin name | RPi pin name | Extra info |
---|---|---|
SDA | GPIO7, CE1 | MUST BE A SPI PORT (CE0/CE1) or create more SPI ports |
SCK | GPIO11, SCKL | All RC522 share this pin |
MOSI | GPIO10, MOSI | All RC522 share this pin |
MISO | GPIO9, MISO | All RC522 share this pin |
IRQ | GPIO?? | Anything, just update rfid_utils.py line 19 + |
GND | Ground | |
RST | GPIO?? | Anything, just update rfid_utils.py line 19 + |
3.3V | 3V3 |
pip3 install -r requirements.txt
to install packages
python3 main.py
to start example
insert sd card to pc config.txt -> add to bottom -> dtoverlay=dwc2 cmdline.txt -> add after rootwait -> modules-load=dwc2,g_ether create empty file called (no extension) -> ssh create a file called -> wpa_supplicant.conf add this to file: country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1
network={ scan_ssid=1 ssid="Plan Ahead Wifi" psk="a1b2c3d4e5" }