Edgetriggered pulse counter

Hey everyone i'm kinda new to Arduino programming. i need to program a sketch that can count 5V pulses from a generator using Arduino. i need to count the edtriggered pulses and the time between them? + i need to make it visible on a serial monitor?

Can anyone send me in the right way or post a sketch ?

I would help me alot! (sorry for my bad english

How long is a pulse? What's the time between pulses?

Will pulseIn() help?

DrDiettrich: How long is a pulse? What's the time between pulses?

Will pulseIn() help?

I dont need to know how long a pulse is, just the time between the uprising pulses.

The best way to detect the edge of a pulse is with an interrupt. Look up attachInterrupt() in the Reference section.

...R

Robin2:
The best way to detect the edge of a pulse is with an interrupt. Look up attachInterrupt() in the Reference section.

…R

Can’t find it ?

You must not have tried very hard - here

And it's the first hit when I Google "arduino attachinterrupt"

...R