An Arduino library for controlling Train Simulator, based on keyboard simulation. NOTE: Train Simulator has the problem that is not compatible with any sort of analog interface, for example throttle lever is actuated by pressing A and D buttons on a keyboard. This library uses a method based on simulated key presses for a time calculated on the basis of the lever position. I do not intend to say that it is the best possible method or that it works in the best way, but it is the best solution that I have managed to find for the moment. Different trains will work differently, so I had to make some different implementations of the regulator and the brake section. A list with required configuration based upon different trains is under construction.
Keyboard input must be set to US in the computer. This enables the correct key binding to the system. Full documentation is available in the example files and in the Wiki section on GitHub.
Works on Arduino boards with HID support. Tested boards:
- Arduino Micro
- Arduino Leonardo
- Piskey Atto
- Choose
Sketch->Include Library->Add .ZIP Library... - Select the library downloaded from GitHub as ZIP.
cd ~/Documents/Arduino/libraries/
git clone https://github.com/VassilyDev/TSControlSee examples folder.
This library is licensed under the MIT Licence.
