Closed prampec closed 7 years ago
This is because it seem that from Arduino 1.6.6 functions needs to be defined before using them as function pointers. I still need to investigate whether this is intended to be a change from 1.6.6, of will be fixed in later versions.
For a quick fix you need to do define a function first like this:
void callBack1(Task* me);
Task t1(2000, callBack1);
If this is a permanent change in Arduino, than all documentation and all Example code needs to be updated accordingly.
This issue will not be fixed in SoftTimer, rather we will wait Arduino to fix this issue in the compiler in later versions. See details: https://github.com/arduino/arduino-builder/issues/50
That seems to be it, thanks. Of course now it can't find PciListener.h somewhere further down the line, but I'm guessing that's my issue.
I have similar (and many) errors, after moving the Task t1(0, myLoop) below the function definition, as you have suggested, I cant get the PciListener to get included properly. (version 1.6.7)
In Debouncer.h there are two lines:
//#include
Switch which of these two is commented out, and PciListener.h gets included correctly.
Finally I decided to fit all the examples of the SoftTimer to the current requirements of the Arduino compiler, as the authors does not seem to to solve this problem.
From Arduino version 1.6.6 all previous codes, including all examples fails with a compiler error message like this: 'callBack' was not declared in this scope