Warning
This is a heavy WIP system. All could change in the future. As of right now, this is where the repo stands. Also, this repo (specifically websites) are AI Agent Generated. There will be a disclaimer on each generated area with "Generated by Anthropic's Claude."
This is a simple card scanner program that uses an RFID scanner that is PnP and acts like a USB keyboard.
The program is simple, and works like so:
- It awaits a "." to be pressed (via a scan, as all ID's on cards start with ".")
- It reads keyboard actions until enter is pressed via a keyboard listener (pynput).
- It checks back with a database for the ID, and deducts credits from the user (pymongo/MongoDB).
This should work with any PnP (Plug n Play) RFID card reader.
- Setup a MongoDB Server (Either setup Community Edition to run locally OR setup community on a server to talk back to/setup MongoDB Atlas, all methods work just fine.)
- Set the connection URI based on the setup you have with MongoDB
- Setup the Database "delt_arcade" with the collections "cards" "news" "transactions" "users".
- Run the script. If all goes well, you should be brought to the attract screen. Your console output (if you so choose) will output "Going to attract...", and you should see something like this:
- Prepare to run the WebUI. Open the WebUI Folder and run this via python or by pip
pip install fastapi uvicorn pymongo python-jose[cryptography] passlib[bcrypt] python-dotenv bcrypt==4.0.1. These are the dependecies for the webserver. (This will be cleaned up into a requirements later.) - set the admin via
py -c "from webui import create_admin;create_admin()". This will generate you an adminstrator account. - run
webui.py. This is a FastAPI script generated by Anthropic's Claude, which doubles as a webserver. Any content on this website has been AI Assisted by Anthropic's Claude. - go to
localhost:8080for the WebUI, andlocalhost:8080/docsfor the API documentation made by FastAPI. - Add a card via your administrator account, and give it credits.
You can do 1 of 2 things.
- For the untested version, grab the latest code via going to
Code > Download ZIP, use GitHub Desktop to grab the code from the repository, or use a Git client and rungit clone https://github.com/GooberDelta/Delts-DIY-Scanner/ - For the latest version pushed. Please go here to get the latest build available.
PLEASE READ: YOU NEED TO EDIT SOME PARTS OF THIS SCRIPT TO WORK WITH YOUR GAME OF CHOICE. AND THIS IS ONLY BUILT FOR WINDOWS. ANY OTHER VERSIONS ARE NOT OFFICIALLY SUPPORTED BY ME.
Some lines to edit:
(182) app_windows = pygetwindow.getWindowsWithTitle("Project Outfox") # REPLACE WITH YOUR GAME NAME, E.X STEPMANIA, ITGMANIA
(192) kb.press("[") # REPLACE "[" WITH YOUR INSERT CREDIT BUTTON!
(242) q1 = {"gameName": "OutFox"} # OutFox is the default set, but you can set this to something else. make it match your DB.
I have tested this with this reader and card from Amazon. You could probably find a better one to use, but this project works great for any generic PnP (Plug N Play) RFID card reader.
Thanks to @Uzziaheart on X/Twitter for the logo!
We now have a trello for Progress on this project. I would highly recommend viewing it if you find interest in this project.
Trello for Repo