Skip to content

albertorestifo/trenino

Repository files navigation

trenino

Trenino

Train Sim World + Arduino · "Model train" in Italian

Bridge your custom hardware to Train Sim World

Features · Getting Started · Supported Hardware · Development

TSW6 License

Features

See Trenino in action!

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
  • 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
  • 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

Getting Started

Requirements

  • Train Sim World 6 with the External Interface API enabled (see below)
  • An Arduino board — see Supported Hardware

Installation

Download the latest release for Windows from the Releases page.

Enabling the TSW API

Train Sim World 6 ships with an External Interface API for third-party apps. To enable it:

  1. Right-click Train Sim World 6 in Steam → Properties
  2. In the General tab, add -HTTPAPI to Launch Options
  3. Launch the game once to generate the API key

Trenino detects the API key automatically on startup.

Supported Hardware

Board MCU Analog Inputs Digital I/O Status
Arduino Nano ATmega328P 8 14 Fully tested
Arduino Nano (Old 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.

Development

git clone https://github.com/albertorestifo/trenino.git
cd trenino
mix deps.get
mix ecto.setup
mix phx.server

Visit localhost:4000. See the docs folder for architecture and development guides.

License

CC BY-NC 4.0 — free to use and modify for non-commercial purposes. For commercial licensing, contact alberto@restifo.dev.

Acknowledgment

Inspired by MobiFlight.

About

Train Sim World + Arduino = Your custom controllers

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages