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() {
    timer.setInterval(1000, repeatMe);

void loop() {

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.

  • Did you install the library? Jan 22 '20 at 15:56
  • int setInterval(long d, timer_callback f) the function needs a long value, you're trying to pass an integer.
    – Dougie
    Jan 22 '20 at 22:23

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.