Ok, I took some time to figure out how exactly timers work out and how to use them for my project. It does look much better now, I used portions of the Tone code.
Now a question. What happens if my code takes too long inside an interrupt? How can I check if that happened?
As in ...
ISR(TIMER2_COMPA_vect)
{
// CRAZY long code //
unsigned long iou = 0;
for (unsigned long pp=0; pp<99999999; pp++) { iou += pp+12; }
}
I know the code should be short. But I need to know how can I check if I made something too complex for the HZ calls I'm doing.
I'm pretty sure this is yet another stupid thing I'm doing, so, please, bear with me while I learn this up.... and thanks again for helping me out. ![]()
Wk