Hi,
I have created a first testscript to start working with interrupts. I have uploaded the code below into my aruino uno (pin 2).
When I put a 5v current the ISR triggers once as it should be and works correct. The strange thing is, when I remove the 5V current I get new ISR calls serveral times and after a while it stops and the processing becomes stable again.
I'm I doing something wrong that triggers the ISR when the current is removed?
int pin = 2;
volatile int state = LOW;
void setup()
{
attachInterrupt(0, blink, HIGH);
Serial.begin(9600);
}
void loop()
{
Serial.println(" loop......");
delay(1000);
}
void blink()
{
Serial.println("ISR ");
}