How to handle PRESS n HOLD operation in case of PUSH Button?

Technical Discussions on any InterfaceKits
akxreddy

How to handle PRESS n HOLD operation in case of PUSH Button?

Postby akxreddy » Wed Nov 12, 2008 11:26 am

I am creating an application interfacing with the PhidgetInterfaceKit. And I need to simulate two actions of a push button:
PRESS
PRESS and HOLD

As per our knowledge, it is known that device sends 'TRUE' when it is pressed but what if it is pressed and hold continously? Does it keep sending an event with 'TRUE' or what?

Please correct me if my understanding is wrong and let us know the right way to handle the Press, Press & hold operations and suggest the device to acheive the same.

Regards,
Anand.

fitchett
Site Admin
Posts: 263
Joined: Fri Dec 05, 2003 3:45 pm
Location: Canada
Contact:

Postby fitchett » Wed Nov 12, 2008 1:50 pm

You only get an event when the state changes. Your application that receives the events would have to note the initial 'TRUE' event. At that time you would set a timer for about 0.5 seconds. If the input is still true in 0.5 seconds, then you are in a Press and Hold situation. If you get the 'FALSE' event before the timer goes off, you got a Press situation.

Chester

akxreddy

Postby akxreddy » Wed Nov 12, 2008 2:22 pm

Thanks for your quick response. I have a couple of questions :

Whic device can be used to simulate this PUSH Button functionality?

On a different note:
Does every device connected to InterfaceKit have serial number?

Thanks,
-Anand.

fitchett
Site Admin
Posts: 263
Joined: Fri Dec 05, 2003 3:45 pm
Location: Canada
Contact:

Postby fitchett » Wed Nov 12, 2008 5:45 pm

Will you have a button that the user presses, or will the interfacekit somehow replace an existing button?

The Interfacekit has a serialnumber - devices attached are not able to identify themselves, so they have no serial number.

Chester

akxreddy

Postby akxreddy » Thu Nov 13, 2008 11:25 am

We have an InterfaceKit. It is needed to simulate two push buttons and two rotary knobs. But in my investigation , I came to know that there are two devices to simulate rotary knobs, which are Rotarty sensor and Rotary Encoder. Rotary sensor can be connected to the interfacekit where as Rotary encoder can directly connect to the PC.

Hence our option was to use Rotary sensor over Rotary encoder. And now for simulating push buttons, we have no idea what device to use?

So It is here by asking you that What phidget device should I use to simulate Push Buttons?

Thanks,
Anand.

fitchett
Site Admin
Posts: 263
Joined: Fri Dec 05, 2003 3:45 pm
Location: Canada
Contact:

Postby fitchett » Thu Nov 13, 2008 11:32 am

What do you mean by simulating push buttons? You want to connect a push button to the PC, yes?

Chester

akxreddy

Postby akxreddy » Thu Nov 13, 2008 12:14 pm

Our final intention is to run a software in a PC, which will interact with InterfaceKit. This software has an LED, which glows GREEN when the button is pressed for less than 3 sec and glows RED when the button is pressed for more than 3 sec.

So, are there any input devices that can be connected to the digital input port of the InterfaceKit to achieve this?


Return to “InterfaceKits”

Who is online

Users browsing this forum: No registered users and 1 guest