I have created a library that uses functions in the Timer3 library and when I try to use my library I get the error message -
"Users/mbauld/Documents/Arduino-2/libraries/TimerLibrary_TEST/TimerLibrary_TEST.cpp: In member function 'long int timerTEST::accelerationStepCounter(long int)':
/Users/mbauld/Documents/Arduino-2/libraries/TimerLibrary_TEST/TimerLibrary_TEST.cpp:48:45: error: no matching function for call to 'TimerThree::attachInterrupt()'
Timer3.attachInterrupt(accelSendPulse_test);
^
/Users/mbauld/Documents/Arduino-2/libraries/TimerLibrary_TEST/TimerLibrary_TEST.cpp:48:45: note: candidate is:
In file included from /Users/mbauld/Documents/Arduino-2/libraries/TimerLibrary_TEST/TimerLibrary_TEST.cpp:7:0:
/Users/mbauld/Documents/Arduino-2/libraries/Timer3/TimerThree.h:34:10: note: void TimerThree::attachInterrupt(void (*)(), long int)
void attachInterrupt(void (isr)(), long microseconds=-1);
^
/Users/mbauld/Documents/Arduino-2/libraries/Timer3/TimerThree.h:34:10: note: no known conversion for argument 1 from '' to 'void ()()'
exit status 1
Error compiling."
I have included the Timer3 library in my header file and have also tried including it in the source file but it still doesn't accept me using a function as an argument for the Timer3.attachInterrupt function.
Has anyone tried this before and had the same problem? Any help would be appreciated.
The library I have created uses an interrupt to accelerate a motor. I have run my code before trying to make a library and it runs perfectly.