https://github.com/zenith08/dcc-ex_py
A simple way to connect to your DCC-EX controlled model railroad using python code without having to write DCC-EX commands into code.
https://github.com/zenith08/dcc-ex_py
arduino dcc trains
Last synced: 4 months ago
JSON representation
A simple way to connect to your DCC-EX controlled model railroad using python code without having to write DCC-EX commands into code.
- Host: GitHub
- URL: https://github.com/zenith08/dcc-ex_py
- Owner: Zenith08
- License: mit
- Created: 2024-09-22T23:57:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-13T22:43:49.000Z (about 1 year ago)
- Last Synced: 2025-08-17T05:32:22.893Z (11 months ago)
- Topics: arduino, dcc, trains
- Language: Python
- Homepage: https://pypi.org/project/DCC-EX-py/
- Size: 57.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DCC-EX_py
[](https://pypi.python.org/pypi/DCC-EX_py)
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](https://dcc-ex.com/#gsc.tab=0) 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](https://dcc-ex.com/reference/software/command-summary-consolidated.html) to be easy to use from python code.
- Free software: MIT License
- Documentation: https://github.com/Zenith08/DCC-EX_py/wiki
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](https://github.com/Zenith08/DCC-EX_py/wiki) including code for the examples.
## Examples
### Single Sound-Enabled Train:
[](https://youtu.be/8A_f9tJLWSE)
This video shows a train running a simple loop with sound triggers and stopping based on sensors in the track.
### Multiple Complex Trains
[](https://youtu.be/ylQdYiYuVxI)
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.