Blink using ArduinoTimer

I am trying to create a Blink program based on the MegunoLink sample, and using ArduinoTimer. I can set and list the OnTime and OffTime using MegunoLink, but the actual times the LED is on and off sometimes match the programmed times (as best as I can estimate), but at other times the on and/or off times are obviously either shorter or longer than programmed. That is, the loop runs continuously but the on and off times keep varying.

Note: I am a newbie to Arduino, and my knowledge of C/C++ is rather limited.

Any suggestions will be appreciated.

Blink Timer Code.txt (1.16 KB)

I have never used those libraries.

IMHO it would be much simpler to make an LED blink using millis() as illustrated in Several Things at a Time

...R

You appear to be having both timers running at the same time. You need to stop the off timer when the LED is on, and stop the on timer when the LED is off.