diff --git a/platformio.ini b/platformio.ini index 49dd6ea..b133bed 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -default_envs = samd21 +default_envs = samd21, mega2560, mega328 [env] lib_deps = diff --git a/src/main.cpp b/src/main.cpp index 663db8d..9a03cc4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,13 +8,13 @@ // Motor driver selection: // Comment out all but the two lines that you want to use -// ;DCC* mainTrack = DCC::Create_WSM_SAMCommandStation_Main(50); +// DCC* mainTrack = DCC::Create_WSM_SAMCommandStation_Main(50); // DCC* progTrack = DCC::Create_WSM_SAMCommandStation_Prog(2); // DCC* mainTrack = DCC::Create_Arduino_L298Shield_Main(50); // DCC* progTrack = DCC::Create_Arduino_L298Shield_Prog(2); -DCC* mainTrack = DCC::Create_Pololu_MC33926Shield_Main(10); +DCC* mainTrack = DCC::Create_Pololu_MC33926Shield_Main(50); DCC* progTrack = DCC::Create_Pololu_MC33926Shield_Prog(2); //////////////////////////////////////////////////////////////// @@ -34,11 +34,12 @@ void setup() { #if defined (ARDUINO_ARCH_SAMD) CommManager::registerInterface(new USBInterface(SerialUSB)); // Register SerialUSB as an interface + Wire.begin(); // Needed for EEPROM to work #elif defined(ARDUINO_ARCH_AVR) CommManager::registerInterface(new SerialInterface(Serial)); // Register Serial (USB port on mega/uno) as an interface #endif - //EEStore::init(); + EEStore::init(); StringParser::init(mainTrack, progTrack); // Set up the string parser to accept commands from the interfaces CommManager::showInitInfo();