Problem with my serial monitor

retrolefty:

So, what do you sugest?
Where should I put a delay?

Delay() is rarely the best method of handling timing situations. You need to keep a flag variable of the last state of the digitalRead() command and then when you read it again you compare it to the flag value, if they are the same then nothing changed, if they are different then there was a state change with the button and you then update the flag variable for the next time you check the input pin as well as perform the task you need to do because of the state change.

Lefty

Can you put a simple code example, please?