thomasfredericks/Metro-Arduino-Wiring

Missing Metro::reset() in the example code

Opened this issue · 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().