THE GENERAL IDEA
Due to the nature of the BRX the game setting menu is complicated for beginners, and it is time consuming to educate players on the settings/options as well as get players on the correct settings to efficiently run games. The mobile applications for the system have also proven problematic and difficult to use. Therefore, I saw a need for my passion of laser tag to be smoother and get more play time as well as have a good solution for score reporting.
JEDGE (J-EDGE) Is my way of turning the BRX into a commercial grade system, well at least an attempt at it. A single ESP32 acts as a hosting device to master configure other ESP32 devices that are individually installed onto BRX taggers and to control them as the master/host demands. The individual devices lock out the button pushing and potential for player errors while handling the BRX taggers.
HOW IT WORKS:
ESP32 devices have two processing cores and built in Bluetooth and Wi-Fi capability. Maximizing its potential, though the devices have only one antenna I’m able to run Bluetooth and Wi-Fi together on the same radio channel to pair the esp32s to the taggers. Some taggers (first generation) use Bluetooth classic and require an additional HC-05 Bluetooth module to optimize the communication as I’ve found the esp32’s classic Bluetooth capability functional and successful but not consistent.
Each tagger needs to individually be set up to pair to its permanent tagger. They also need to be assigned a unique ID number for scoring purposes. Taggers should be marked accordingly to visually communicate which tagger is which player.
Once Taggers are properly modified with the ESP32, using Wi-Fi type communication with ESSPRESS-IF’s ESP-NOW communications protocol, the host controller communicate with each tagger.
Additionally, the ESP32 can also use an RYLR896/890 module to communicate between taggers and the host controller, providing long range communication at a slower data transmission rate. This is helpful for when players play outside the range of each other so that play control/communication can still be established for kill confirmations or when a game is over.
In my GOOGLE drive I will keep updated videos referenced in this manual to help you along your way. The link to the drive is below. Note that this can take some time to learn about micro controllers to pull off JEDGE and if its above your head, I’ll probably be selling pre-configured components if you reach out to me. Also, along the way I have spent a lot of money and a lot of time into putting this all together. If you appreciate my efforts, please donate below:
Here are links to my most recently preferred hardware components:
- You need the ESP32U plus antenna, you can use other ones but the 32U has advantages over others. I used to try and go as cheap as possible but I’ve been burned to many times. If you go with a non 32U you may not fit my PCB if wanting to use it. Others likely have a built-in antenna too.
- LoRa module is Optional
- Keyed Switch and HC-05 are for first generation taggers (legacy)
update 4/2/2020 annotations added and copied over objects for setting up games
* update 4/3/2020 Cleaned up for more compatibility to serial comms programing
* update 4/3/2020 Was able to plug in set setting from serial for friendly fire and outdoor/indoor mode
* update 4/4/2020 was able to get team settings and manual input team settings working as well as gender settings
* updated 4/4/2020 included weapon selection assignment and notification to select in game settings manual options
* updated 4/6/2020 separated many variables to not share writing abilities from both cores (trouble shooting)
* upfsyrf 4/7/2020 finished isolating variables between cores to eliminate both cores writing to same variables
* updated 4/7/2020 fixed the resetting of the BLE function so device stays paired to brx, also integrated the delay start with the send game settings to start the game
* updated 4/8/2020 fixed some menu callout audio selections, reduced the delay time to verify what is best and still functions to avoid disconnects
* updated 4/8/2020 fixed weapon slot 1 loading issue, was set to weapon slot 0 so guns were overwriting.
* updated 4/9/2020 fixed team selection item number and set freindly fire on when free for all selection is made for team selection.
* updated 4/9/2020 fixed audio announcement for teams for free for all to say free for all
* updated 4/9/2020 fixed audio announcement for domination to read control point versus select a game
* updated 4/9/2020 fixed limited ammo, wasnt allowing limited ammo due to incrorrect if then statement setting
* updated 4/9/2020 fixed the manual team selection option to enable players to pick their own teams
* updated 4/10/2020 enabled LCD data sending to esp8266, updated data to be sent to get lives, weapon and other correct indicators sent to the LCD
* updated 4/13/2020 worked on more LCD debuging issues for sending correct data to LCD ESP8266
* updated 4/14/2020 changed power output for the BLE antenna to try to minimize disconnects, was successful
* updated 4/15/2020 fixed unlimited ammo when unarmed, was looping non stop for reloading because no ammo on unarmed
* updated 4/15/2020 added additional ammunition options, limited, unlimited magazines, and unlimited rounds as options – ulimited rounds more for kids
* updated 4/19/2020 improved team selection process, incorporated “End Game” selection (requires app update) disabled buttons/trigger/reload from making noises when pressed upon connection to avoid annoying sounds from players
* updated 4/19/2020 enabled player selection for weapon slots 0/1. tested, debugged and ready to go for todays changes.
* updated 4/22/2020 enabled serial communications to send weapon selection to ESP8266 so that it can be displayed what weapon is what if lCD is installed
* updated 4/22/2020 enabled game timer to terminate a game for a player
* updated 4/27/2020 enabled serial send of game score data to esp8266
* updated 4/28/2020 adjusted volume settings to modify volume not at game start but whenever
* updated 5/5/2020 modified the delayed start counter to work better and not stop the program as well as incorporate auditable countdown
* updated 5/5/2020 incorporated respawn delay timers as well as respawn stations for manual respawn
* updated 5/6/2020 fixed count down audio for respawn and delay start timers, also fixed lives assignment, was adding 100 to the lives selected. Note: all 5/5/2020 updates tested functional
* updated 5/6/2020 fixed game timer repeat end, added two minute warning, one minute warning and ten second count down to end of game
* updated 5/6/2020 re-instated three team selection and added four team auto selections
* updated 5/7/2020 disabled player manual selections when triggered by blynk for a new option to be enabled or if game starts (cant give them players too much credit can we?)
* updated 5/8/2020 fixed a bug with the count down game timer announcements
* updated 5/22/2020 integrated custom weapon audio
* updated 5/25/2020 disabled auto lockout of buttons upon esp32 pairing, enabled blynk enabled lockout of buttons instead by V18 or 1801 serial command This way we can control esp32 bluetooth activation to be enabled instead of automatic
* updated 5/25/2020 added in deap sleep enabling if esp8266 sends a 1901 command
* updated 8/11/2020 changed reporting score processes and timing to instant upon esp8266 request
* updated 8/14/2020 fixed error for sending player scores, was missing player  and had a player same for team and team
* updated 8/16/2020 added an IR Debug mode that when a tag is recieved, it enables the data to be sent to the esp8266 and forwarded on to the app
* updated 8/18/2020 added OTA updating capability to device, can be a bit finicky so be patient i guess.
* updated 10/30/2020 reformatted code for easier legibility and clearl define all functions
* updated 10/30/2020 added in manual respawns from nades/bases, also added in other IR based tag support, but it might be better to change the IR types later to not cause damage, or add in a healt boost with the feature
* Updated 11/16/2020 fixed bugs with manual respawn. all good now
* Updated 12/12/2020 started moving over blynk objects from esp8266 for making the esp32 a standalone device for controlling the brx
* updated 12/12/2020 re did the dual core for my most up to date method that eliminates need for extensive delays between loop cycles
* updated 12/12/2020 revised the method for sending the data to brx to use serial comms from Serial1 versus bluetooth
* updated 12/12/2020 revised method for receiving data from brx to be serial instead of ble and created object to analyze the data received
* updated 12/16/2020 bug checking, adding in some serial prints etc to see what it is doing, changed order and some declarations
* updated 12/17/2020 fixed bugs where audio was not sounding for buttons pressed for confirmations, also fixed volume adjustments in app as well as code, fixed weapon selection bug for loading weapons
* updated 12/17/2020 fixed serial print for debug for recieved data via serial from brx. improved print out for verification of received values
* updated 12/17/2020 fixed primary weapon set when starting up, the respawn bullet type 15 is not being accepted from some reason. removed it for now for future fix
* updated 12/17/2020 fixed looping weapon, team and weapon manual selection so that it actually exits, it was looping for some reason even after confirming
* updated 12/17/2020 removed team selections under manual for teams 4 and 5 because it was previously discovered they dont work.
* updated 12/23/2020 fixed server connection features, added automatic power down of esp if wifi or blynk not available to save energy on brx, added auto configurations based upon generation of gun input
* updated 12/28/2020 fixed error for delayed starts, needed to add a vtask delay to the timer while loop to prevent dev board crashes
* updated 12/28/2020 fixed lives call out and assignment as well as app
* updated 12/29/2020 added in a reset function if wifi is present in game and the blynk app isnt connected after a good 10 seconds and a couple checks on it
* updated 12/30/2020 added wifi reset for when error for connection to blynk server occurs. This will notify via audio of a connection lost and re established as well as enable blynk reconnection if more than 5 seconds pass with wifi present and blynk server disconnected.
* updated 01/01/2021 updated score sync settings for sending but still needs love
* updated 01/02/2021 fixed the network checks so that they do not spin out of control while in game and players move away from the wifi network
* updated 01/07/2021 added player and team selection for custom settings based upon player id or team alignment
* updated 01/08/2021 changed default options for ammunition to be unlimited magazines instead of limited ammo
* updated 01/08/2021 added “lets move out” to start game sequence so players know when its time to go and they got the command to start the game and can “move out”, no one knew when we could go spread out
* updated 01/10/2021 added game mode integration for quick preset settings for games – work in progress still
* updated 01/12/2021 added terminal integration for sending commands from terminal to push commands to taggers, also added blynking led on esp while awaiting OTA update
* updated 01/13/2021 put back in the end of game announcements to do count down timers 2 minute warning, one minute and final countdown.
* updated 01/23/2021 added in the integration of IR for picking up weapons and getting random perks by base activation.
* updated 04/08/2021 updated for stealth and visual confirmations etc and gen3 specific needs
* updated 04/08/2021 removed all blynk applications and prioritized interrupt with ESPNOW for applying settings
* removed OTA update for now for simplicity, can add back in later.
* updated 04/16/2021 added in all the webserver objects and declarations and started working on app-less controls
* added some of the menu options for controls and tested between two esps
* updated 04/18/2021 Fixed misc. bugs discovered by the guys testing out things on the set up and application. changed default esp command to 32700 so it doesnt make unusual kill confirmatinos
* fixed some headset color issues, fixed some call out issues, nothing major in terms of changes, just debugging.
* updated 04/19/2021 added back in automatic sleep function for when no controls are executed within 4 minutes of boot up.
* Added OTA back in
* UPDATED 04/20/2021 Fixed the bug for ending games, on host device/tagger
* Added a toggle to allow for disabling Access point and web server
* updated 04/26/2021 Fixed all scoring bugs (I hope) had it tested by Paul a bit and tested a bit on my own. Finalized how i want scoring to show on the app for totals – I should be all done with scoring
* Added in syncing local scores if host device is a tagger.
* updated 05/01/2021 found bug for assimilation – hopefully fixed by adding in player settings object
* added in menu option for doing variations of melee.
* finished gun game mode
* updated 05/01/2021 tweaked a bit more on melee disarm function
* finished up main settings for infection mode.
* updated 05/12/2021 added some jbox espnow actions in
* updated 05/15/2021 added in a dead but not out timer for battle royale
* added in perk selections, finally, for weapon 5 right button
* updated 05/16.2021 added notifications for when a new leadr captures domination base* updated 05/19/2021 added in capture the flag gameplay interactino with jbox * updated 06/06/2021 added in feature for resent settings from controller so that taggers who received it do not react but those who missed it, do react * fixed the battle royale pistol so that it has unlimited ammo instead of limited ammo * updated 06/07/2021 added in forwarding of kill confirmations to other players. unique kill confirmations to be forwarded once and then reset after 4 seconds pass to alow forwarding of the sae one again, later. * added hidden menu unlock ability * updated 06/12/2021 added repeat of settings commands from controller to rebroadcast to help to ensure that all taggers get the command sent from controller * updated 07/04/2021 added in score reporting in game by each tagger by pressing a button (left button – melee) * enabled capturing of other taggers score reporting to accumulate score on this device to report accurate score info at end of game on tagger. * fixed bug for receiving kill confirmations that are repetitive or back to back so that it works regardless. * updated 07/10/2021 Added in web based updating and tagger ID reasignment * updated 07/11/2021 Added in data packet 5 for espnow to request and receive wifi credentials from controller * updated 07/12/2021 removed packet 5 and went with strings for web connection and added in gun gen selector for eeprom * updated 07/20/2021 Added callout functions provided by paul for some settings, adjusted kill confirmation callouts but still not 100% * Added tagger/headset color changes upon esp32 boot/reboot, for identification of reboot/boot * Added in audio confirmations for update processes * updated 07/24/2021 Fixed gen3 false starts with work around by multiple sendstring repetitions * Fixed Gen3 looping green headsets after respawn * updated 07/26/2021 fixed all kinds of audio integration issues, got starwars up and running, contra up and running. fixed tons of bugs * possibly fixed assimilation… needs testing but hopefull *crosses fingers* * updated 07/29/2021 Changed the score announcements for players taggers to select button instead of left dpad button (melee interference) * fixed the stealth outdoor/indoor call out and selection * tweaked the headset random flashing problem – hopfully * updated 07/31/2021 fixed manual respawn from IR. Jecked it on JBOX to confirm functionality. All appears to now be in * working order. * changed the tagger weapons for starwars mode to have 200 or so rounds and rapid fire rifle, low damage and higher damage regular blaster * changed SWAPBRX weapon pick ups and perks etc from a loot. This way it has better flow/function, also updated weapons for upgrades * and worked on a better pistol upgrade process, changing the pistol sound each time as well as its strength. (needs testing) * Hopefully assimilation is now working as well. * updated 08/04/2021 Even better improvements for assimilation mode. making it work even smoother. * Added in off line game mode options/settings * updated 08/1202021 Incorporated all pbgame settings for primarily utilizing offline game modes, trouble shooting issues as well * UPDATED 08/16/2021 FIXED LOTS OF BUGS * updated 08/21/2021 removed all not necessary jedge 3.0 stuff * updated 08/22/2021 added in eeprom for game settings saves, score saves etc, restart tagger upon reboot of esp, if the gun doesnt respond to query command – used saved game settings * removed all non-essential broadcasts of espnow data packets – only one remaining is for score sync * changed game start to only work if all taggers are selected. this prevents operator error for leaving only one player selected * updated 08/24/2021 removed all vtask delays to ensure that watchdog is not avoided. we want to be able to allow for the device to reset when having issues * removed undesired web server code segments and start processes to ensure no unneeded clutter * added in verification if game time for pbgames indicates time up. if time is up, reset the esp32, also if deaths are equal to initial planned lives game is over and reset as well * updated 08/25/2021 fixed audio timing issue for music playing game modes, modified starwars and contra pset health/armor as well as the weapons to be similar to offline game modes. * Added in the receiveing and processing of all game settings when start game comes in * updated 08/30/2021 fixed two way communication, had to bring back in AP settings post deletion. * updated 09/03/2021 added jbox respawn functionality for espnow based respawn * updated 09/10/2021 added in eeprom storage for wifi credentials * removed requests for wifi credentials via espnow * removed espnow set up while doing ota update * updated 09/11/2021 added back in repeat commands from controller only
* 10/4/2021 put together BLE coms from previous configurator
* 10/5/2021 confirmed coms with a tagger that ble client objects are successful
* removed unnecessary portions of code to minimize size of sket and organization
* and preparing for espnow introduction to run in background of ble comms
* added in espnow objects
* 10/6/2021 Added in the webserver for settings adjustments from default
* added in web based update and tested for performance
* added in capacitive touch for verification of if web app is to run or not
* added in eeprom for storing wifi credentials for web updates
* cleared out unnecessary variables and code lines from copied/pasted code from other sketches
* 10/7/2021 planning on option implementations:
* Difficulty: easy, normal, hard – to adjust armor and currenthealth levels
* Weapon slots one, two and three as options for misc weapons depending on how complicated you want it to get for boss player
* add in a melee weapon selection for close range instant explosive death
* add in a left button for stun/disable players temporarily
* add in a right button for gasing players
* 11/1/2021 I’ve integrated all the functionality of JEDGE on top of the web server auto start functions. I need to do some testing now
* Both BLE and Bluetooth and Serial comms should function to integrate all JEDGE 4.0 functionality
* I also added back in the score reporting for each tagger by pressing the select button (needs testing)
* DECEMBER I had Bluetooth serial working but backed it out because I couldn’t get it to work on all devices.