Is button pressed? If yes how long? Won´t work

Robin2:
Write a simple program to learn how to detect the button. Then when it works you can incorporate it into a larger program.

I did. And I translated it into this sketch. Do you think it was luck that it worked previously?

Robin2:
And don't use single characters for variable names other than in FOR loops. When I try to highlight all of the instances of a variable called 'u' I get every 'u' in every word in the program.

Okay, thank you for the information I will keep it in mind.