Trains request access to the single track section by means of RFID tags stuck to the engine motors. The tags are read by MFRC522 based RFID readers in the passing sections of the track. Should the single track section be clear, the points are set as required and the train is sent on its way. While the single track section is occupied, any further requests for access to the section are queued.
Custom Lego parts
Custom 3D-printed Lego parts are required to switch the points. Additional custom parts include track sections to hold the RFID reader, and signals which double up as IR transmitters. More...
This code is open source software, licensed under the Apache 2.0 License.