After reading the button to delay the execution without stopping action before a

The two new variables that I introduced must be declared outside the setup() function.