- 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
- 5mm LED Light Diodes
- 220 Ohm 1/2 W through hole Resistor
- Breadboard button
- Go to
tools > board manager
and search foresp32
- Install
esp32
byEspressif Systems
, specifically version 3.1.0 - Set the board in
tools
asESP32-WROOM-DA Module
- Go to
tools > library
, installMFRC522
byGithub Community
, version 1.4.11
- change the API KEY from
NOTHING_REALLY
to the key used by the card verification server - change the
ssid
andpassword
variables to the appropriate values of the network that we need to connect to - (optional) if the code does not compile, consider following miguelbalboa/rfid#371
- 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
- Ensure you are in the
backend/
directory; if not, runcd backend
from the project's root directory. - 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]
- Example:
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 ofpython
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.