I was testing on an Adafruit Feather 32U4, and all was well. I am using the DeepSleepScheduler library,
https://github.com/PRosenb/DeepSleepScheduler. I am expecting my Digispark Pro units to arrive within the next couple days, so I switched the board in the Arduino IDE, and got the following compilation errors in the DeepSleepScheduler:
In file included from /Users/flounder/OneDrive/Projects/XXX/V2/Sketches/Temperature/Temperature.ino:4:0:
/Users/flounder/Documents/Arduino/libraries/DeepSleepScheduler/DeepSleepScheduler.h: In member function 'Scheduler::SleepMode Scheduler::evaluateSleepModeAndEnableWdtIfRequired()':
/Users/flounder/Documents/Arduino/libraries/DeepSleepScheduler/DeepSleepScheduler.h:707:7: error: 'WDTCSR' was not declared in this scope
WDTCSR |= (1 << WDCE) | (1 << WDIE);
^
/Users/flounder/Documents/Arduino/libraries/DeepSleepScheduler/DeepSleepScheduler.h:715:5: error: 'WDTCSR' was not declared in this scope
WDTCSR |= (1 << WDCE) | (1 << WDIE);
^
I have already submitted this as an issue to the author of the library, but I'm hoping someone can tell me if WDTCR (the symbol apparently defined for the '167) is the same as the WDTCSR used in the above code. And a suggestion of what compile-time conditionals I might use to detect this, e.g.
#ifdef WHATEVER_IS_A_DIGISPARK_PRO_OR_167
#define WDTCSR WDTCR
#endif
would be a perfectly acceptable solution.
joe