interrupt starts at different times depending on upload time of program

holmes4:

(which rises from 2,2 to 3,2 V, so logical 0 to 1)

2.2v is not logical 0. logical 0 is a voltage below 0.6v for a 5v Atmel chip.

Mark

I checked it and the threshold for a logical "HIGH" seems to be 3V, which as I said works for me (otherwise the interrupt wouldn't get triggered and I wouldn't see a blue picture).

Robin2:
You seem to have an 800 millisec delay() in your interrupt routine. There should be NO delay in an interrupt routine. It should be as short as possible so it finishes in a few microseconds.

Your interrupt routine should set a flag variable that is used by another part of your code to decide to do whatever.

230Hz is very very slow for an Arduino. I can't imagine there is any need to use interrupts.

...R

I know that using delays in an interrupt is very very bad, however, the 800us are over before the next interrupt gets triggered and I'm doing this so the camera gets triggered right away with the rising edge and the shutter stays open during the puls width (800us). And to put this just within the loop didn't work, I tried it, but it was slow and the timing was not consistent enough to always trigger the camera after the same amount of time after the rising edge was detected (the brightness of the blue picture was flickering too much, which I got rid of using the interrupt).

JimEli:
why is this in there?

Serial.begin(9600);

This is in there because in a further part of the program I want to do a serial read that stops the interrupt when it receives a "1", you're right though, in this code snippet it diesn't do anything.

KeithRB:
I think it is time to drag out the scope. Also, unless the arduino is doing something else, I think straight hardware would be the best way to get low latency.

What do you mean by dragging out the scope? And using a hardware solution I couldn't use variable shutter times (I'm not sure whether I want to stay with 800us) and also couldn't just switch off the interrupt routine depending on user input, which is what I'm planning on adding later with a serial.read. But what would dragging out the scope mean?