Metro-Arduino-Wiring icon indicating copy to clipboard operation
Metro-Arduino-Wiring copied to clipboard

Missing Metro::reset() in the example code

Open wei-peng opened this issue 11 years ago • 0 comments

The library and example code is very brief and clear. But I think the Metro::reset() should be called once at the begaining of every example. Maybe in setup().

IMHO, the consequence of not calling Metro::reset() is not severe as the code repeats the HIGH/LOW sequence anyway. But not initilizing previous_millis by calling Metro::reset() causes the first round of the loop being excuted immediately rather than waiting for 250ms.

Or the constructor function could initialize previous_millis by calling Metro::reset().

wei-peng avatar Mar 29 '14 23:03 wei-peng