You're right! You can use any motor-driver, you only need to change the sketch. I just find it more convenient to use a ready-made module, especially since the L298 has two channels, since my system was designed to control many players simultaneously.
As for the DCC control, then on a system is impossible making even such a simple function as automatic stopping a train before a red signal. Or I'm wrong?
You did not answer my question about how DCC stopping concrete train before red signal. DCC is one-way data send system. How does the DCC-decoder on a train determine that in front of it is the red signal?
The train does not know there is a red signal with DCC or (as far as I can see) with your system. It is the computer control system that knows when a train must stop and sends the appropriate instructions to the DCC decoder in the loco telling it to slow down and stop.
You however need a quite complicated control system that knows which signal has which state and which loco is where.If I ever build again, I will build using my existing non-DCC locos; but digitally controlled.
It does not work like this In order for a computer to know the position of a particular train on a layoutl,
Light Dependent Resistor.@Robin, have you considered sensing of current to know if a train is in a section?
The main thing that I definitely would have done differently is the use of the I2C bus; it's not designed for long distances. and hence your setup requires all URBs to be close to each other which will still result in long wires under a layout. I've always visualised my design with RS232/RS422/RS485 which would be better in my view so modules can be closer to the area where they are needed and reducing the wire mess under a layout. It will also be easier for modular layouts.
Finally had some time to visit your site and ... amazing project.