i'm really a newbie, so i have to ask again...
i want to use the interruption function from the reference:
attachInterrupt(interrupt, function, mode)
would it work when i insert the interruption between every blink of the led in the interval();?
and i don't really know what i should insert in the brackets of the interrupt function...
I'm no expert either, but I think the general idea is that you want to put whatever you want to be executed when the interrupt happens in the interrupt function. When the interrupt happens, the processor stops doing what it was doing, say in the middle of a delay(), and jumps over to do the stuff in interrupt() function.
So for example, you can setup a loop like this:
int flag = 1;
void loop() {
while(flag == 1) {
turnonLED();
}
}
interrupt() {
flag = 0;
turnoffLED();
}
When this runs, the LED will be kept on until the interrupt occurs, setting flag to 0 thus quitting the while loop and turning off the LED.
Not the best code example, but like I said, I'm no expert!
-Z-