DCCpp
This is the library version of a program for Arduino to control railroading DCC devices.
Configuration Lines

This is the 'begin' lines for some common configurations. Note that for LMD18200, the two final arguments must be adapted to your need... The wiring for these configurations is visible here : http://www.locoduino.org/spip.php?article187 . The text is in french, but schemas can be understood !

Arduino Uno + LMD18200 + MAX471
DCCpp.beginMain(UNDEFINED_PIN, DCC_SIGNAL_PIN_MAIN, 3, A0);
Arduino Uno + 2 LMD18200 + 2 MAX471
DCCpp.beginMain(UNDEFINED_PIN, DCC_SIGNAL_PIN_MAIN, 3, A0);
DCCpp.beginProg(UNDEFINED_PIN, DCC_SIGNAL_PIN_PROG, 5, A1);
Arduino Mega2560 + LMD18200 + MAX471
DCCpp.beginMain(UNDEFINED_PIN, DCC_SIGNAL_PIN_MAIN, 3, A0);
Arduino Mega2560 + 2 LMD18200 + 2 MAX471
DCCpp.beginMain(UNDEFINED_PIN, DCC_SIGNAL_PIN_MAIN, 3, A0);
DCCpp.beginProg(UNDEFINED_PIN, DCC_SIGNAL_PIN_PROG, 11, A1);
Arduino Uno or Mega2560 + Arduino Motor Shield
DCCpp.beginMainMotorShield();
DCCpp.beginProgMotorShield();

or

DCCpp.beginMain(MOTOR_SHIELD_DIRECTION_MOTOR_CHANNEL_PIN_A, DCC_SIGNAL_PIN_MAIN, MOTOR_SHIELD_SIGNAL_ENABLE_PIN_MAIN, MOTOR_SHIELD_CURRENT_MONITOR_PIN_MAIN);
DCCpp.beginProg(MOTOR_SHIELD_DIRECTION_MOTOR_CHANNEL_PIN_B, DCC_SIGNAL_PIN_PROG, MOTOR_SHIELD_SIGNAL_ENABLE_PIN_PROG, MOTOR_SHIELD_CURRENT_MONITOR_PIN_PROG);
Arduino Uno ou Mega2560 + Pololu Motor Shield
DCCpp.beginMainPololu();
DCCpp.beginProgPololu();

or

DCCpp.beginMain(POLOLU_DIRECTION_MOTOR_CHANNEL_PIN_A, DCC_SIGNAL_PIN_MAIN, POLOLU_SIGNAL_ENABLE_PIN_MAIN, POLOLU_CURRENT_MONITOR_PIN_MAIN);
DCCpp.beginProg(POLOLU_DIRECTION_MOTOR_CHANNEL_PIN_B, DCC_SIGNAL_PIN_PROG, POLOLU_SIGNAL_ENABLE_PIN_PROG, POLOLU_CURRENT_MONITOR_PIN_PROG);