Skip to content

A simple way to connect to your DCC-EX controlled model railroad using python code without having to write DCC-EX commands into code.

License

Notifications You must be signed in to change notification settings

Zenith08/DCC-EX_py

Repository files navigation

DCC-EX_py

image

A simple way to connect to your DCC-EX controlled model railroad using python code without having to write DCC-EX commands manually.

DCC-EX is an Arduino powered DIY tool for running DCC model trains on a layout. This package wraps the protocol described in the DCC-EX Native Commands Summary Reference to be easy to use from python code.

This package is in early development, breaking changes may happen until it is marked version 1.0.

Features

  • Connects to a DCC-EX base station and wraps commands to make automating layouts easier.
  • Parses feedback from the command station and provides callbacks for important events.

Get Started

Documentation is available on the GitHub Wiki including code for the examples.

Examples

Single Sound-Enabled Train:

Amtrak Example

This video shows a train running a simple loop with sound triggers and stopping based on sensors in the track.

Multiple Complex Trains

Multitrain Example

This video shows what can be done when multiple trains are programmed to perform complex behavior. The routes are all pre-planned and designed to loop.

Be aware that the crossing signal is being controlled by EX-RAIL automation on the command station instead of externally by the python script.

This project is not an official DCC-EX project nor is it endorsed by them. I just used the name that best decribes the funcionality and will change it if it creates issues.

About

A simple way to connect to your DCC-EX controlled model railroad using python code without having to write DCC-EX commands into code.

Topics

Resources

License

Stars

Watchers

Forks

Languages