Skip to content

Instantly share code, notes, and snippets.

@matteyeux
Created December 14, 2017 14:57
Show Gist options
  • Select an option

  • Save matteyeux/38c12197f47ac87cc0e8e4c9e2db34e7 to your computer and use it in GitHub Desktop.

Select an option

Save matteyeux/38c12197f47ac87cc0e8e4c9e2db34e7 to your computer and use it in GitHub Desktop.
void cool_delay(int timeinms){
if (bitRead (TIFR2, 0) == 1)
{
TCNT2 = 9;
bitSet (TIFR2, TOV2);
if (++varCompteur == 12)
{
varCompteur = 0;
ledon;
} else
{
ledoff;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment