Timeralarm and time libraries

I'm having an issue trying to run a periodic routine using the Alarm.timerRepeat function on the setup routine:

Alarm.timerRepeat((ID_TIMER*60), ID_CW.sonidocaracter(IDCW, 15));

ID_TIMER is pulled from eeprom in a previous section and its value (in this particular case) is 10 so 10*60, so the first parameter passed to the Alarm.timerRepeat is 600, next is a function that is part of an class instance. The function "sonidocaracter" needs two parameters, a character string and the lenght of the string.

The compilation error pointing to this line is: "Invalid use of void expression"

If I comment that line the compilation goes fine, the question is:

Can arguments be passed to functions within the Alarm.timerRepeat function? if so, what is the proper syntax?

Thanks

I believe you just put in the function name in the 2nd param. It cannot have params.

mistergreen: I believe you just put in the function name in the 2nd param. It cannot have params.

Exactly. The event happens (the right amount of time passed), so the function gets called, with no arguments.

Notice that I said function, NOT method. You can NOT use a class method as the second argument, since the alarm class has no idea which instance of your class it should call the method for.

You need to write a function that takes no arguments. In that function, you can call the method you want, on the instance of the class that you want, with whatever arguments the method needs.

Thanks very good idea!!