Mifare RC522 RF IC Card Sensor Module amazon link
ESP32 Development Board amazon link
RFID capable card (the above RFID Sensor amazon link includes with purchase)
IRLZ44N Power Mosfet amazon link
10k Ohm 1/2 W through hole Resistor
The button for adding a card
5mm LED Light Diodes
220 Ohm 1/2 W through hole Resistor
Breadboard button
Go to tools > board manager and search for esp32
Install esp32 by Espressif Systems, specifically version 3.1.0
Set the board in tools as ESP32-WROOM-DA Module
Go to tools > library, install MFRC522 by Github Community, version 1.4.11
Using the Python Developer Tool
Create a Python Virtual Environment : python3 -m venv .venv
Activate the Virtual Environment :
On Mac/Linux: source .venv/bin/activate
On Windows: .venv\Scripts\activate
Install dependencies: cd backend && pip install -r requirements.txt
To check if a card exists :
python mock_card_reader.py \
--base-url [base_url] \
--port [port] \
--card-bytes [card_bytes] \
--api-key [api_key]
python mock_card_reader.py \
--base-url localhost \
--port 8080 \
--card-bytes 12345 \
--api-key TESTAPIKEY123
To add a card : same command as to check if a card exists, but add the --add flag to the end:
python mock_card_reader.py \
--base-url localhost \
--port 8080 \
--card-bytes 12345 \
--api-key TESTAPIKEY123 \
--add
Note that you may need to use python3 instead of python depending on your system specifications.
The required fields are --card-bytes and --api-key. --base-url defaults to localhost, and --port defaults to 8080 if not provided.
Once the arguments are parsed, the tool will send an HTTP request to the server and return with the response you desire.