The objective of this system is to operate locomotives and turnouts automatically to run a preplanned scenario. The Arduino 2560 operates the Slow Motion Turnout Machines, while the NCE Power Cab operates the locomotives as directed by the Train Control Program. The Train Control Program responds to simple one character text files set and reset by the Zone Trigger Program responses.
The Arduino board uses a simple C-Sharp style language that is very simple to code. Serial commands are sent from the Train Controller to the Arduino. The Arduino responds by setting digital outputs high or low. The Arduino has enough power to operate the low current turnout motors directly.
The Train Control software and all of the text files software are written in Liberty Basic.
( See TGDpage5 for general details with Arduiono. )
Click on the link below and save the
zipped folder. Open the downloaded zip folder and save the contents of the contained folder "TrainCode" to a folder named C:\Temp\TA. This folder contains the Liberty Basic files and exe files needed to run the Train Controller.
Run the ZXoneTrain.... bas file in debug and change the com file nubers as needed, or remove com files to test the function. Two of the text exe files are saved there as .bas files to view the code. LBB can convert the bas to exe.