increment too fast

I am just trying to do a simple code where if i push a botton the value has to increment one by one to ten (for example). But the increment is too fast if i push once incremets from 0 to 16 or even more. Sorry for the bad engish.

counter.ino (1.45 KB)

Your English is ok.

Go and look at the example sketches in the IDE called "state change" and "button debounce".

Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks… Tom… :slight_smile: