Can any pin on arduino be used with interrupts, and can I have several of them?
If the interrupt interrupts a main loop, after execution the function does it get back to the next command of the loop before interrupting or to beginning of the loop?
Can any pin on arduino be used with interrupts, and can I have several of them?
If the interrupt interrupts a main loop, after execution the function does it get back to the next command of the loop before interrupting or to beginning of the loop?
Can any pin on arduino be used with interrupts, and can I have several of them?
You can use digital pins 2 or 3 for interrupts see this page, attachInterrupt() - Arduino Reference
If the interrupt interrupts a main loop, after execution the function does it get back to the next command of the loop before interrupting or to beginning of the loop?
In my experience to the next command in the loop, and I think the interrupt should always interrupt the main loop. Thats the only code running, nothing else need interruption :). Someone correct me if I am wrong.
does it get back to the next command of the loop before interrupting or to beginning of the loop?
The whole idea behind the interrupt architecture is that the code which is interrupted need not even be aware that the interrupt occured. Step B will always follow step A, even if a couple of timer/serial/wire interrupts intervene.