Accelerating momentary pushbutton

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
beambase
Posts: 94
Joined: Wed Jul 29, 2009 5:15 pm
Has thanked: 6 times
Been thanked: 8 times

Accelerating momentary pushbutton

Post by beambase »

Hello
I am working on a menu structure for a LCD display where a couple of different values are set and stored in EEPROM.
I am tryibf to use one momentary + buuton to increase a value and a - button to decresae the value.
The idea is that the + button will increase with 1 if just presssed but if it is pressed for a longer time the value will start to count up with an increasing speed. The value that needs to be set will be somwhere between 10 and 4000 so a constant slow increasing speed would be of no use.

Does anyone has an example of how to do this? Or any hints or ideas how it could be done?

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Accelerating momentary pushbutton

Post by Steve »

The speed of increase/decrease of the count can be set so it depends on the time the button has been held down. For example, if the "+" button is held it begins counting up by 1 for the first few seconds. If it remains held down, it counts up by 10 for the next few seconds, and so on. Releasing the button and then holding it down again will reset this rate of increase back to 1.

Post Reply