I downloaded the SimpleTimer library from the Arduino's library manager and navigated to Arduino Playground website for some sample code for testing - SimpleTimer - Arduino Playground. After copying the following code into the Arduino IDE:
#include <SimpleTimer.h>
// the timer object
SimpleTimer timer;
// a function to be executed periodically
void repeatMe() {
Serial.print("Uptime (s): ");
Serial.println(millis() / 1000);
}
void setup() {
Serial.begin(9600);
timer.setInterval(1000, repeatMe);
}
void loop() {
timer.run();
}
I receive the following error:
exit status 1
no matching function for call to 'SimpleTimer::setInterval(int, void (&)())'
Please help me out here as I am doing everything according to the instructions given in the arduino playground page of SimpleTimer.
int setInterval(long d, timer_callback f)the function needs alongvalue, you're trying to pass an integer. – Dougie Jan 22 '20 at 22:23