SimpleTimer Error

Hello All,

I’ve recently been looking through timer libraries and came to the conclusion that SimpleTimer might be the best option for my project. The issue with it is that I receive the following error whenever I try to run the provided testing code:

Timer_test.cpp.o: In function `setup':
C:\Program Files (x86)\Arduino/Timer_test.ino:14: undefined reference to `SimpleTimer::setInterval(long, void (*)())'
Timer_test.cpp.o: In function `loop':
C:\Program Files (x86)\Arduino/Timer_test.ino:18: undefined reference to `SimpleTimer::run()'
Timer_test.cpp.o: In function `__static_initialization_and_destruction_0':
C:\Program Files (x86)\Arduino/Timer_test.ino:4: undefined reference to `SimpleTimer::SimpleTimer()'
collect2.exe: error: ld returned 1 exit status
Error compiling.

The test code itself that Marcello provides is:

#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();
}

Hopefully someone knows the solution to this problem, as I cannot seem to figure it out on my own.

Thanks in advanced,
~Lights

The issue with it is that I receive the following error whenever I try to run the provided testing code:

Provided where? A link to the library is in order.

PaulS:
Provided where? A link to the library is in order.

My apologies, the playground site is located here. Unfortunately, I'm very new to the world of Arduino, so as of now I am stuck to mainly asking questions. Let me know if you need more info.

It is often much easier to write your own timing code using millis() as illustrated in several things at a time. At least you won't have the problem of trying to figure out the code in a library.

...R