detecting two rising edges from camshaft signal

wvmarle:
What do you mean "nothing worked"?

How fast are your eyes? Can you really see an LED that blinks for 1 ms? Do a Serial.print() or so instead (for testing only as you're bound to start missing pulses due to the slow Serial). Or at least connect your scope to the output pin, as that way you can make the signal visible much easier.

My observations were not obviously based on seeing an LED blinking for 1ms. I used an oscilloscope on PROTEUS platforme. the blue line is the input signal and the output is the yellow one.

the sensor's signal is generated with another arduino, so it's 0 to 5V. you can see screenshots bellow.