mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 16:16:13 +01:00
commit
3ccae75e37
80
README.md
80
README.md
|
@ -1,52 +1,60 @@
|
||||||
# What's DCC++ EX
|
# What is DCC++ EX?
|
||||||
------------
|
DCC++ EX is the organization maintaining several codebases that together represent a fully open source DCC system. Currently, this includes the following:
|
||||||
|
|
||||||
DCC++ EX is an open-source hardware and software system for the operation of DCC-equipped model railroads. It expands on the work of Gregg E. Berman's original DCC++ (which can be found here in the BaseStation-Classic repository)
|
* [CommandStation-EX](https://github.com/DCC-EX/CommandStation-EX/releases) - the latest take on the DCC++ command station for controlling your trains. Runs on an Arduino board, and includes advanced features such as a WiThrottle server implementation, turnout operation, general purpose inputs and outputs (I/O), and JMRI integration.
|
||||||
|
* [exWebThrottle](https://github.com/DCC-EX/exWebThrottle) - a simple web based controller for your DCC++ command station.
|
||||||
|
* [BaseStation-installer](https://github.com/DCC-EX/BaseStation-Installer) - an installer executable that takes care of downloading and installing DCC++ firmware onto your hardware setup.
|
||||||
|
* [BaseStation-Classic](https://github.com/DCC-EX/BaseStation-Classic) - the original DCC++ software, packaged in a stable release. No active development, bug fixes only.
|
||||||
|
|
||||||
The system consists of two parts, the DCC++ EX Command Station and one of many front end controllers. These controllers can be hardware controllers (called CABs or Throttles), software applications like JMRI, phone apps like Engine Driver, or our exWebThrottle that is a simple application you run in a browser like a web page and control your model trains.
|
A basic DCC++ EX hardware setup can use easy to find, widely avalable Arduino boards that you can assemble yourself.
|
||||||
|
|
||||||
The DCC++ EX Command Station consists of an Arduino micro controller fitted with an Arduino Motor Shield (or other supported motor controllers) that can be connected directly to the tracks of a model railroad.
|
Both CommandStation-EX and BaseStation-Classic support much of the NMRA Digital Command Control (DCC) [standards](http://www.nmra.org/dcc-working-group "NMRA DCC Working Group"), including:
|
||||||
|
|
||||||
# What’s in this Repository
|
* simultaneous control of multiple locomotives
|
||||||
-------------------------
|
* 2-byte and 4-byte locomotive addressing
|
||||||
|
* 128-step speed throttling
|
||||||
|
* Activate/de-activate all accessory function addresses 0-2048
|
||||||
|
* Control of all cab functions F0-F28
|
||||||
|
* Main Track: Write configuration variable bytes and set/clear specific configuration variable (CV) bits (aka Programming on Main or POM)
|
||||||
|
* Programming Track: Same as the main track with the addition of reading configuration variable bytes
|
||||||
|
|
||||||
This repository, CommandStation-EX, contains a complete DCC++ EX Commmand Station sketch designed for compiling and uploading into an Arduino Uno, Mega, or Nano. All sketch files are in the folder named CommandStation-EX and its subforlders. More information about the sketch can be found in the included PDF file.
|
# What’s in this Repository?
|
||||||
|
|
||||||
To utilize this sketch, you can use the following methods:
|
This repository, CommandStation-EX, contains a complete DCC++ EX Commmand Station sketch designed for compiling and uploading into an Arduino Uno, Mega, or Nano. All sketch files are in the folder named CommandStation-EX and its subforlders.
|
||||||
|
|
||||||
* our automated installer
|
To utilize this sketch, you can use the following:
|
||||||
* download a zip file from this repository (green Code button above) and unzip it
|
|
||||||
* use git clone on this repository
|
|
||||||
|
|
||||||
With the manual methods you unzip or git clone to the Arduino IDE
|
1. (beginner) our [automated installer](https://github.com/DCC-EX/BaseStation-Installer)
|
||||||
projects folder and then open the file "CommandStation-EX.ino" in the
|
2. (intermediate) download the latest version from the [releases page](https://github.com/DCC-EX/CommandStation-EX/releases)
|
||||||
|
3. (advanced) use git clone on this repository
|
||||||
|
|
||||||
|
Not using the installer? Open the file "CommandStation-EX.ino" in the
|
||||||
Arduino IDE. Please do not rename the folder containing the sketch
|
Arduino IDE. Please do not rename the folder containing the sketch
|
||||||
code, nor add any files in that folder. The Arduino IDE relies on the
|
code, nor add any files in that folder. The Arduino IDE relies on the
|
||||||
structure and name of the folder to properly display and compile the
|
structure and name of the folder to properly display and compile the
|
||||||
code. If you do not run the installer, you have to copy
|
code. Rename or copy config.example.h to config.h. If you do not have
|
||||||
config.example.h to config.h. If you do not have the standard config
|
the standard setup, you must edit config.h according to the help texts
|
||||||
you edit config.h according to the help texts in config.h.
|
in config.h.
|
||||||
|
|
||||||
The latest production release of the Master branch is 3.0.1:
|
## What's new in CommandStation-EX?
|
||||||
|
|
||||||
* Supports the Arduino Uno, Arduino Mega, and Arduino Nano
|
* WiThrottle server built in. Connect Engine Driver or WiThrottle clients directly to your Command Station
|
||||||
* Built-in configuration for both the original Arduino Motor Shield, Pololu MC33926 Motor Shield, LMD18200, and BTS7960B
|
* WiFi and Ethernet shield support
|
||||||
* Built-in configuration and support of Ethernet Shields and the ESP82266 WiFi module (networking for use with Mega only).
|
* No more jumpers or soldering!
|
||||||
|
* Direct support for all the most popular motor control boards
|
||||||
|
* I2C Display support
|
||||||
|
* Improved short circuit detection and automatic reset from an overload
|
||||||
|
* Current reading, sensing and ACK detection settings in milliAmps instead of just pin readings
|
||||||
|
* Improved adherence to the NMRA DCC specification
|
||||||
|
* Complete support for all the old commands and front ends like JMRI
|
||||||
|
* Railcom cutout (beta)
|
||||||
|
* Simpler, modular, faster code with an API Library for developers for easy expansion
|
||||||
|
* New features and functions in JMRI
|
||||||
|
* Automation (coming soon)
|
||||||
|
|
||||||
For more information on the overall DCC++ EX system, please follow the links in the PDF file.
|
NOTE: DCC-EX is a major rewrite to the code. We started over and rebuilt it from the ground up! For what that means to you, click [HERE](notes/rewrite.md).
|
||||||
|
|
||||||
Detailed diagrams showing pin mappings and required jumpers for the Motor Shields can be found in the Documentation Repository
|
# More information
|
||||||
|
You can learn more at the [DCC++ EX website](https://dcc-ex.com/)
|
||||||
|
|
||||||
The Master branch contains all of the Command Station functionality showed in the DCC-EX YouTube channel.
|
- November 14, 2020
|
||||||
|
|
||||||
# How to find more information
|
|
||||||
--------------------------
|
|
||||||
|
|
||||||
[DCC++ EX WEB Page](https://dcc-ex.github.io "DCC++ EX WEB Page")
|
|
||||||
|
|
||||||
[The DCC++ EX Discord and live support](https://discord.gg/y2sB4Fp "The DCC++ EX Discord Server")
|
|
||||||
|
|
||||||
[TrainBoard DCC++ Forum](https://www.trainboard.com/highball/index.php?forums/dcc.177/ "TrainBoard DCC++ Forum")
|
|
||||||
|
|
||||||
-May 2020
|
|
||||||
!!
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
along with CommandStation. If not, see <https://www.gnu.org/licenses/>.
|
along with CommandStation. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "WifiInterface.h" /* config.h and defines.h included here */
|
#include "WifiInterface.h" /* config.h included there */
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
#include "DIAG.h"
|
#include "DIAG.h"
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
@ -157,6 +157,9 @@ wifiSerialState WifiInterface::setup2(const __FlashStringHelper* SSid, const __F
|
||||||
StringFormatter::send(wifiStream, F("AT+GMR\r\n"));
|
StringFormatter::send(wifiStream, F("AT+GMR\r\n"));
|
||||||
checkForOK(2000, OK_SEARCH, true, false); // Makes this visible on the console
|
checkForOK(2000, OK_SEARCH, true, false); // Makes this visible on the console
|
||||||
|
|
||||||
|
#ifdef DONT_TOUCH_WIFI_CONF
|
||||||
|
DIAG(F("\nDONT_TOUCH_WIFI_CONF was set: Using existing config\n"));
|
||||||
|
#else
|
||||||
StringFormatter::send(wifiStream, F("AT+CWMODE=1\r\n")); // configure as "station" = WiFi client
|
StringFormatter::send(wifiStream, F("AT+CWMODE=1\r\n")); // configure as "station" = WiFi client
|
||||||
checkForOK(1000, OK_SEARCH, true); // Not always OK, sometimes "no change"
|
checkForOK(1000, OK_SEARCH, true); // Not always OK, sometimes "no change"
|
||||||
|
|
||||||
|
@ -256,6 +259,7 @@ wifiSerialState WifiInterface::setup2(const __FlashStringHelper* SSid, const __F
|
||||||
|
|
||||||
StringFormatter::send(wifiStream, F("AT+CIPSERVER=1,%d\r\n"), port); // turn on server on port
|
StringFormatter::send(wifiStream, F("AT+CIPSERVER=1,%d\r\n"), port); // turn on server on port
|
||||||
if (!checkForOK(10000, OK_SEARCH, true)) return WIFI_DISCONNECTED;
|
if (!checkForOK(10000, OK_SEARCH, true)) return WIFI_DISCONNECTED;
|
||||||
|
#endif //DONT_TOUCH_WIFI_CONF
|
||||||
|
|
||||||
StringFormatter::send(wifiStream, F("AT+CIFSR\r\n")); // Display ip addresses to the DIAG
|
StringFormatter::send(wifiStream, F("AT+CIFSR\r\n")); // Display ip addresses to the DIAG
|
||||||
if (!checkForOK(10000, OK_SEARCH, true, false)) return WIFI_DISCONNECTED;
|
if (!checkForOK(10000, OK_SEARCH, true, false)) return WIFI_DISCONNECTED;
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
#ifndef WifiInterface_h
|
#ifndef WifiInterface_h
|
||||||
#define WifiInterface_h
|
#define WifiInterface_h
|
||||||
|
#include "config.h"
|
||||||
#include "DCCEXParser.h"
|
#include "DCCEXParser.h"
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
|
|
|
@ -44,6 +44,12 @@ The configuration file for DCC++ EX Command Station
|
||||||
//
|
//
|
||||||
// DEFINE WiFi Parameters (only in effect if WIFI is on)
|
// DEFINE WiFi Parameters (only in effect if WIFI is on)
|
||||||
//
|
//
|
||||||
|
//#define DONT_TOUCH_WIFI_CONF
|
||||||
|
//
|
||||||
|
// if DONT_TOUCH_WIFI_CONF is set, all WIFI config will be done with
|
||||||
|
// the <+> commands and this sketch will not change anything over
|
||||||
|
// AT commands and the WIFI_* defines below do not have any effect.
|
||||||
|
//
|
||||||
#define WIFI_SSID "Your network name"
|
#define WIFI_SSID "Your network name"
|
||||||
#define WIFI_PASSWORD "Your network passwd"
|
#define WIFI_PASSWORD "Your network passwd"
|
||||||
#define WIFI_HOSTNAME "dccex"
|
#define WIFI_HOSTNAME "dccex"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user