a button with multiple functions.

Hello! Is it possible to program a button with multiple functions.
I want to build a stopwatch with 4 displays. First press of the button starts the first time. Second pressure on the push button stops the first time and starts the second time, and so on. Can someone give an example how the code section may look like?

"First Printing, high on pin 12 start time 1" or so? :wink:

That is what programming is all about.
You have to use a variable that holds the current state.

For example state 0 : nothing is going on, waiting for button.
state 1 : first timer is running
and so on.

You also need to think about how you will let the user know which state the system is in.

...R