diff --git a/ArduinoTimers.h b/ArduinoTimers.h index 99af18f..85e3644 100644 --- a/ArduinoTimers.h +++ b/ArduinoTimers.h @@ -11,7 +11,7 @@ #include "ATMEGA2560/Timer.h" #elif defined(ARDUINO_AVR_UNO) #include "ATMEGA328/Timer.h" -#elif defined(ARDUINO_ARCH_MEGAAVR) +#elif defined(ARDUINO_AVR_UNO_WIFI_DEV_ED) #include "ATMEGA4809/Timer.h" #else #error "Cannot compile - ArduinoTimers library does not support your board, or you are missing compatible build flags." diff --git a/DCC.h b/DCC.h index b2070a9..05c50e1 100644 --- a/DCC.h +++ b/DCC.h @@ -155,7 +155,7 @@ private: #define ARDUINO_TYPE "NANO" #elif defined(ARDUINO_AVR_MEGA2560) #define ARDUINO_TYPE "MEGA" -#elif defined(ARDUINO_ARCH_MEGAAVR) +#elif defined(ARDUINO_AVR_UNO_WIFI_DEV_ED) #define ARDUINO_TYPE "UNOWIFIR2" #else #error CANNOT COMPILE - DCC++ EX ONLY WORKS WITH AN ARDUINO UNO, NANO 328, OR ARDUINO MEGA 1280/2560 diff --git a/DCCWaveform.cpp b/DCCWaveform.cpp index bec16b3..6c71696 100644 --- a/DCCWaveform.cpp +++ b/DCCWaveform.cpp @@ -41,9 +41,11 @@ void DCCWaveform::begin(MotorDriver * mainDriver, MotorDriver * progDriver, byte progTrack.setPowerMode(POWERMODE::OFF); switch (timerNumber) { case 1: interruptTimer= &TimerA; break; +#ifndef ARDUINO_AVR_UNO_WIFI_DEV_ED case 2: interruptTimer= &TimerB; break; #ifndef ARDUINO_AVR_UNO case 3: interruptTimer= &TimerC; break; +#endif #endif default: DIAG(F("\n\n *** Invalid Timer number %d requested. Only 1..3 valid. DCC will not work.*** \n\n"), timerNumber);