15 #define UNDEFINED_PIN 255 21 #define MAX_MAIN_REGISTERS 12 28 #ifdef ARDUINO_AVR_MEGA // is using Mega 1280, define as Mega 2560 (pinouts and functionality are identical) 29 #define ARDUINO_AVR_MEGA2560 32 #if defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_NANO) // Configuration for UNO or NANO 34 #define DCC_SIGNAL_PIN_MAIN 10 // Arduino Uno - uses OC1B 35 #define DCC_SIGNAL_PIN_PROG 5 // Arduino Uno - uses OC0B 37 #elif defined(ARDUINO_AVR_MEGA2560) 39 #define DCC_SIGNAL_PIN_MAIN 12 // Arduino Mega - uses OC1B 40 #define DCC_SIGNAL_PIN_PROG 2 // Arduino Mega - uses OC3B 48 #define MOTOR_SHIELD_SIGNAL_ENABLE_PIN_MAIN 3 49 #define MOTOR_SHIELD_SIGNAL_ENABLE_PIN_PROG 11 51 #define MOTOR_SHIELD_CURRENT_MONITOR_PIN_MAIN A0 52 #define MOTOR_SHIELD_CURRENT_MONITOR_PIN_PROG A1 54 #define MOTOR_SHIELD_DIRECTION_MOTOR_CHANNEL_PIN_A 12 55 #define MOTOR_SHIELD_DIRECTION_MOTOR_CHANNEL_PIN_B 13 57 #define POLOLU_SIGNAL_ENABLE_PIN_MAIN 9 58 #define POLOLU_SIGNAL_ENABLE_PIN_PROG 11 60 #define POLOLU_CURRENT_MONITOR_PIN_MAIN A0 61 #define POLOLU_CURRENT_MONITOR_PIN_PROG A1 63 #define POLOLU_DIRECTION_MOTOR_CHANNEL_PIN_A 7 64 #define POLOLU_DIRECTION_MOTOR_CHANNEL_PIN_B 8 77 static uint8_t EthernetIp[4];
78 static uint8_t EthernetMac[6];
79 static int EthernetPort;
80 static EthernetProtocol Protocol;
83 static byte SignalEnablePinMain;
84 static byte CurrentMonitorMain;
86 static byte SignalEnablePinProg;
87 static byte CurrentMonitorProg;
90 static byte DirectionMotorA;
91 static byte DirectionMotorB;