Change states based on how long a button is held down
I'm assuming this isn't possible, but wanted to run it by everyone to find out for sure. Here is what I would like to do:
I work for a agriculture equipment manufacturer and I would like to be able to simulate raising or lowering a header on a combine. I know I could probably have 15 different states showing the header in different positions from all the way down to all the way up and then change these based on pressing the up or down control multiple times; however, in the real world you wouldn't press the button 15 times to raise or lower, you'd hold the button in until the desired position is achieved and then release it. Is there any way to simulate this? It might seem like it's not worth the effort; however, I want to teach a calibration procedure and it really won't feel real / simulate the real thing well unless I can achieve this.
Hopefully this makes sense; basically I want to have several states (images of the piece of equipment in different positions) and pick the state based on how long the raise / lower button is held. Could I increment / decrement a counter based on how long a button is held and then use that to select the state? or time how long the button is held down? or???