CmdrArduino
CmdrArduino is an Arduino library written in C++ that provides the foundation for implementing an NMRA DCC command station. CmdrArduino presents classes and methods for, among other things, setting a locomotive’s speed, activating functions, switching turnouts, and programming DCC decoders. CmdrArduino translates these commands into DCC packets. The packets are carefully prioritzed, and CmdrArduino keeps track of packets that require repeating in the background. An interrupt service routine attached to Timer1 takes these packets and injects the highest priority packet into the precision DCC waveform generated on digital pin 9. This signal is suitable for amplification with your favorite booster/power station (I like RAILbooster). Please note that the Arduino outputs are not themselves capable of driving trains directly.
CmdrArduino is fully open-source software, and is released under the terms of the GPL. CmdrArduino is inspired by, and parts derived from, code written by Wolfgang Kufer.
More detailed documentation is currently pending, although the code does include an example sketch to demonstrate usage.
You can download CmdrArduino from github; bug reports, contributions of code are welcome. Please do leave a note if you use CmdrArduino in your project.
Please note that at this time CmdrArduino is beta software, and is not feature complete, although it does generally work, as evidenced by this user’s video:
Recent Comments