An alternative:
int counter = 0;
void loop()
{
// do the every time stuff
counter++;
if(counter == 20)
{
// do the every 20th time stuff
counter = 0;
}
}
An alternative:
int counter = 0;
void loop()
{
// do the every time stuff
counter++;
if(counter == 20)
{
// do the every 20th time stuff
counter = 0;
}
}