coupa:
i changed "== "by" = "and i cleared " interrupt" and i wrote volatile unsigned long var[n] but nothing happened.
You need to do these things, too:
- Declare n as volatile. It's shared between the ISR and other code.
- Delete the Serial.print() from Timer1 ISR. That statement is what's stops execution.
How do I guarantee that "n" is increment to the 50 without put the serial inside the ISR ?
Serial.print() n from loop().
i think that your sketch still won't give you accurate results after you make those changes, but it ought to run. The best I can tell, there will still be plenty of things wrong with it. Your code is garbled because you didn't use code tags when you posted it. Anyone who wants to help you will have to guess at what your code really looks like. It's easy for you to make your intent clear; it's hard to guess what you meant. It's been said before in this thread, but I'll be repetitive and say it again:
Use code tags when you post code.