CC1492
Computer
- Aug 12, 2003
- 3
I would like to connect a simple (make/break contact) footswitch to a serial port, which will enable hands-free operation of an application. Before I begin development, has anyone done this? I've outlined the abstract below, but I don't want to re-invent the wheel! Alternately, if I am to do this, then comment would be useful. Oh, I forgot to mention, the platform is Windows/Intel.
Step 1: How to wire the connector. I'm guessing that the footswitch should be wired between DTR (always high) and some other input signal, say CTS. When the footswitch is depressed, then CTS goes high.
Step 2: Next we need an event-monitoring or interrupt-driven process that detects the CTS-high state.
Step 3: Last, we need a user-interface where we can easily configure what to do when the pedal is pressed. Most useful would be an ability to send a keystoke sequence to the active program. As a trivial example: if the pedal is pressed send F1 to the process, and the Help will appear.
Step 4: Allow for a second footswitch, wired, say, between DTR and DSR. Monitor and control in the same way.
Step 1: How to wire the connector. I'm guessing that the footswitch should be wired between DTR (always high) and some other input signal, say CTS. When the footswitch is depressed, then CTS goes high.
Step 2: Next we need an event-monitoring or interrupt-driven process that detects the CTS-high state.
Step 3: Last, we need a user-interface where we can easily configure what to do when the pedal is pressed. Most useful would be an ability to send a keystoke sequence to the active program. As a trivial example: if the pedal is pressed send F1 to the process, and the Help will appear.
Step 4: Allow for a second footswitch, wired, say, between DTR and DSR. Monitor and control in the same way.