prev_t += tMil ; // advance prev_t for next time.
No. You shouldn't be adding times.
unsigned long now = millis();
if (now - prev_t >= tMil) // subtract before compare so always works
{
prev_t += now; // keep track of last time.
prev_t += tMil ; // advance prev_t for next time.
No. You shouldn't be adding times.
unsigned long now = millis();
if (now - prev_t >= tMil) // subtract before compare so always works
{
prev_t += now; // keep track of last time.