i have the following code in an interrupt handler and it appears to be working.
void increment_counter()
{
thetime = millis();
if (thetime - lastpulse >= 12) //this is my debounce check
{
timediff = (thetime - lastpulse);
lastpulse = thetime;
count++;
}
}
however i just read some info in the online reference for interrupts that said that millis() won't work in an interrupt.
is this going to be a problem that blows up in my face some day or should i not worry about it if it appears to be working?
i also read that using an interrupt to get time between pulses is a bad idea. anybody have any comments on this one way or another?
thanks
Jeff