1

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.

user8396171
  • 11
  • 1
  • 2

1 Answers1

1

There are quite a few Arduino libraries called “SimpleTimer”. According to arduinolibraries.info, the one you get through the library manager is Alexander Kiryanenko's SimpleTimer. The one described in Arduino Playground is Marcello Romani's version. You should try the examples that come with the specific library you install.

Edgar Bonet
  • 43,033
  • 4
  • 38
  • 76