Re: using millis() for timing

wiifm:
I'd like to be able to use code such as below in the loop():

doFunctionAtInterval(voidOneArgFunction(&returnedValue), &nextVoidOneArgFunction, 1000);

but I have not had any success getting things to work. See below:

A general solution to this is possible, but far from easy. It requires extensive use of overloading, templates, and virtual member functions to create a versatile function object that can be used in the same way as a function pointer. If you need to ask what any of those things are, you're nowhere near good enough to try rolling your own solution to this.

The ArduinoSTL library appears to have a workable implementation of the functional library, but I haven't personally used it.

The easier way to do this is to create a void(void) function in your sketch that wraps around the function you want to use, and use that as the timer's callback.