Looking for a program to time an arduino mini

Hi All,
I am new to this and need a little help if poss:
I'm looking for a program for a Arduino mini to time for 15 seconds to read the number of BPM when a button is pressed, then keep the number on a display until cancelled. Any idea's.
Thanks Mick.

Any idea's.

Break the project down into a list of steps you can perform and those that you don't think you know how to.

Implement the steps that you can perform.

Break each remaining step down into steps you can perform and those that you don't think you know how to.

Repeat until the project is complete.

You should, for instance, be able to read the state of a switch. The state change detection example has a real useful clue.

Once you detect that the switch has become pressed, read the data from the mysterious sensor that you have, for 15 seconds. The blink without delay has some clues about how to do things for a period of time.