Train Sim World + Arduino · "Model train" in Italian
Bridge your custom hardware to Train Sim World
Features · Getting Started · Supported Hardware · Development · Discord
Share your builds, get help with wiring and setup, and follow what's coming next.
Build your own train controls with real throttle levers, brake handles, switches, and gauges — then connect them to Train Sim World through a simple desktop app. No programming required. Wire up your Arduino, flash the firmware with one click, and start driving.
- One-click firmware flashing — flash Arduino boards directly from the app, no extra software needed
- Guided calibration — step-by-step process to calibrate your levers and controls
- Notch disk design — turn a calibrated lever's notches into a printable notch disk with the train-lever notch disk generator, in one click
- Auto-detection — automatically recognizes which train you're driving and loads the right configuration
- Visual control mapping — map any hardware input to simulator controls using the built-in API explorer
- Rotary selectors (beta) — turn a potentiometer into a switch with fixed positions, such as a lights selector, where each position sets its own simulator value, runs a sequence, or taps a key (train configuration guide)
- Windows virtual joystick (beta) — expose selected calibrated levers and buttons as one removable DirectInput joystick with eight axes and 32 buttons, independently of Train Sim World
- I2C display modules — show live simulator data (speed, brake pressure, gear position) on HT16K33 7- or 14-segment LED displays wired to your Arduino
- Physical gauges (beta) — drive real X27 needle gauges from the controller (firmware 3.3.0 or newer) and bind them to live simulator data such as speed or brake pressure (gauges guide)
- Beta features — features marked (beta) are still being tested; turn them on with "Enable beta features" on the Settings page
- Lua scripting — write custom logic to flash warning LEDs, react to speed changes, automate sequences, and more (scripting guide)
- AI-assisted setup — describe what you want in plain language and let Claude configure your train via MCP integration. Say "set lever A to throttle" and the assistant finds, calibrates and binds the lever, then opens the wizard for the one step that needs you. With Trenino open, a coding agent such as Claude Code or Codex can set itself up when you ask it to "install the Trenino MCP" (setup guide for agents at
http://localhost:4000/llms.txt, in releases newer than 0.8.2)
- Train Sim World 6 or 7 with the External Interface API enabled (see below)
- An Arduino board — see Supported Hardware
Virtual joystick mode is optional and additionally requires Windows 10 or 11 and the vJoy 2.2.2.0 driver, which you install separately. See Getting Started.
Download the latest installer for your platform from the Releases page:
- Windows 10/11: use the NSIS installer (
.exe), which installs the bundled Visual C++ Redistributable and removes Trenino's virtual joystick device on uninstall. The MSI does not run these hooks; its prerequisites must be installed separately. - Linux: AppImage (
.AppImage) — download, mark as executable, and run
macOS builds are not provided as pre-built releases. See the Development Guide to build from source.
Starting with the first updater-enabled stable release, choose Help → Check for Updates to install a newer stable version. Existing users must install that first release manually once. Finish firmware flashing and stop simulator controls before accepting an update; Trenino closes during installation.
Nightly builds still require manual installation. Updater signatures verify update authenticity, but are not Windows publisher certificates, so Windows may still show an installation warning. See distribution details.
Train Sim World 6 and 7 ship with an External Interface API for third-party apps. To enable it:
- Right-click Train Sim World 6 or 7 in Steam → Properties
- In the General tab, add
-HTTPAPIto Launch Options - Launch the game once to generate the API key
Trenino detects the API key automatically on startup.
| Board | MCU | Analog Inputs | Digital I/O | Status |
|---|---|---|---|---|
| Arduino Nano | ATmega328P | 8 | 14 | Fully tested |
| Arduino Nano (New Bootloader) | ATmega328P | 8 | 14 | Fully tested |
| SparkFun Pro Micro | ATmega32U4 | 12 | 18 | Fully tested |
| Arduino Uno | ATmega328P | 6 | 14 | Supported |
| Arduino Leonardo | ATmega32U4 | 12 | 20 | Supported |
| Arduino Micro | ATmega32U4 | 12 | 20 | Supported |
| Arduino Mega 2560 | ATmega2560 | 16 | 54 | Supported |
All boards can be flashed directly from Trenino.
git clone https://github.com/albertorestifo/trenino.git
cd trenino
mix setup
mix phx.serverVisit localhost:4000. See the docs folder for architecture and development guides.
CC BY-NC 4.0 — free to use and modify for non-commercial purposes. For commercial licensing, contact alberto@restifo.dev.
Inspired by MobiFlight.