Close

A couple other asides

A project log for "Sus" (Real Life Among Us)

Creating a real-life version of Among Us using Python, ESP32's, RFID, wifi and Raspberry Pi's

professor-woodyProfessor Woody 02/15/2022 at 10:120 Comments

There were two additional tools in the files which deserve a little mentioning.

The first is an RFID scanner application. The idea was we were going to use it to scan the RFID tags to get their UIDs.  We'd then store the UIDs on the server in a simple table referencing the actual tag name.

To be sure, the tag UIDs are stored on the server and work exactly like that.  Every time a scanner 'scans' an RFID, it calls the server with the UID to ask what the name of the tag is.  This way we could decouple the actual tags from the game code on the scanner - or even dynamically remap them without rebooting everything.  I'm not sure if the RFID scanner app is functional though.


The second item is a small AutoDownloader (AD.py) script.  This was designed to delete all the files off the scanner (with option for exclusions) then download new ones from the server using the same REST calls we used for everything else.  

It's fairly crude and wiping/rewriting the memory of the little ESP32's hundreds of times certainly isn't recommended in the long term.  But using it rapidly increased the speed at which we could prototype one - or multiple - scanners simultaneously.  

In the time it took to copy the changed code to one scanner manually we could flash with this script to 4-5 prototypes, test, make changes, and reflash again.  It also centralised the code as the raspy server would just pull the main dev branch straight from Github, then everything would work off that copy.  

This second item is fully functional and is in AD.py (and integrated into controller/model.py of the API)

Discussions