Arduino Uno Input Capture!!!

AJG059:
Hello together,
I tested the proposal from ballistics and made some changes. Now it seems to work. Nice code
Andreas

That code is hideously complicated for such a simple task, and you don't see to be making any use of the Arduino development environment or runtime library.

Why don't you just poll the input until you see the first event, record the start time, poll the input until you see the second time, record the end time. Subtract start from end to get the elapsed time and then calculate and print whatever it is you're deriving from this. If the events were happening at very high frequency you might have needed to use interrupts to respond to them quickly enough, but when you're looking for very long intervals like this it hardly seems necessary.

As a general note - when posting code, please enclose it in [ CODE ] [ /CODE ] tags to prevent the forum software from munging it.