Go Down

Topic: Railstars CmdrArduino lib help (Read 4246 times) previous topic - next topic


to make a complete Arduino-based command station.

Pretty neat :)

Don Goodman-Wilson

That explains alot, with the booster hooked up to pin 11 it's working perfectly!

Excellent! Glad to hear it! I'll merge the branches later today.

The Mega has a different pinout for the internal timers, which necessitates using a different pin for the signal output. I clearly need to better document this fact!

Do let me know if any other issues crop up, or if there's a feature you'd like to see added, and keep us abreast of the fun things you do with CmdrArduino!


You asked for more issues, and I think I have one...

CV programming, using the latest version I can't program anything, however if I use the old version from January I can program CV2 and above, programming the short address CV doesn't have any effect..

I've tried this on 2 decoder with the same effect, using the Hornby Select I can program the address, but for some reason it re-programs lots of unrelated CVs, which is annoying...

Don Goodman-Wilson

THat's no good! I'll have a look a bit later to see what's changed.

You can't program an address in ops mode, in general. I don't know if that's in the NMRA specs or not, but my Digitrax Zephyr won't do it either. So that, at least, is not a bug :D But the other things are. Do you think there is a pattern to what's getting programmed?


The only thing I've noticed is while CV programming works fine in the old version of the library, if setSpeed128 etc. are called in the same loop as opsProgramCV it all seems to become very unreliable, only programming 10% of the time.

Need to do some more experiments to narrow it down yet i think.

As to the lack of address change is ops mode, thats not very useful, I guess service mode is needed.

Don Goodman-Wilson

Service mode is, unfortunately, another can of worms. Need sensitive current-detection hardware. A different project altogether. But on my plate!


Aug 06, 2015, 02:06 am Last Edit: Aug 08, 2015, 10:46 am by samhain77
Unfortunately eStop bug still exist on my Arduino Uno. :(


Aug 08, 2015, 10:47 am Last Edit: Aug 08, 2015, 11:00 am by samhain77
When I try to run my loco after Stop, the loco can move only forward with small speed and functions is not working. This bug appears very often. I have tried to disconnect wires from rails and connect them again, but it not helps me, only Arduino reset helps.

BTW: For Arduino control I'm using IR remote on Timer 2.


Aug 11, 2015, 10:29 am Last Edit: Aug 11, 2015, 10:31 am by pgahtow
I had also trouble years ago with the CmdrAdruino Library. So I hope I can help.

I build up my own DCC Master (Zentrale) with the CmdrArduino Lib but the Library doesn't repeat DCC loco informations. :-(
So I changed nearly everything inside of the library. It now repeats the information and save them, so you can request the latest state of loco or switches. You can now also programm (CV) on the main track and change the timer for the signal generator. Of course, the eStop works for all and for each loco and I add a power command to stop the Signal gernerator.
Here you can Download my changed version of the library: Arduino DCC Interface Library
I hope you find this changes helpful and it works?
BTW: I'm sorry that my website doesn't support another language then german.


Aug 13, 2015, 02:14 pm Last Edit: Aug 13, 2015, 02:15 pm by samhain77
Hello Philipp,
Thank you for your library.
I have tried it and discovered the following things:
- Speed "0" is working as regular stop (in original library it works as emergency stop)
- Speed "1" is working as emergency stop (in original library it works as regular stop)
- Speed "-1" is working as high backward speed (in original library it works as regular stop from low backward speed)
- Speed "-127" is working as low backward speed (in original library it works as high backward speed)
Are those bugs or features?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131