BiDoU
Newbie level 6

Hello,
I want to use external push button to setup a variable in my microcontroller. I have two button: up and down. I use a debounce algorithm to assure that when I push the button one time only, the variable is incremented one time only...
But the problem for now is when I keep the button pushed, the variable increments at the rate of my debounce cycle time. I want to increment the variable very rapidly if I keep the button pushed for more than 2 seconds (and as well that I keep the button pushed when it's is increment very rapidly). And, before the 2 seconds, I don't want that the variable be incremented.
Maybe someone have an idea or refer me on some web site?
I want to use external push button to setup a variable in my microcontroller. I have two button: up and down. I use a debounce algorithm to assure that when I push the button one time only, the variable is incremented one time only...
But the problem for now is when I keep the button pushed, the variable increments at the rate of my debounce cycle time. I want to increment the variable very rapidly if I keep the button pushed for more than 2 seconds (and as well that I keep the button pushed when it's is increment very rapidly). And, before the 2 seconds, I don't want that the variable be incremented.
Maybe someone have an idea or refer me on some web site?