USB 3-button footpedal programming in C++
USB 3-button footpedal programming in C++
(OP)
I'm currently in a project that involves recieving information with a usb footpedal, modeled like a dictaphone transcriptionist pedal. The language I was thinking of using was C++, for lack of any better ideas. I've perused the USB site and haven't found too much help there. I'm just looking for some kind of sample code or something to help point me in the right direction. Any help would be greatly appriciated.





RE: USB 3-button footpedal programming in C++
10 defint i-x: defseg=0: i=&H408 ' get from 0000:0408 HEX
20 pport= peek(i)+ peek(i+1)*256 ' the addr of printer port
30 sense= pport+1:' Sense inp. port = Output 8 bit port + 1
40 ' Sense port has only bits 3 to 7 but bit 7 is inverted
50 ' so use e.g. bits 4,5,6 for the three switches
60'===================================================
70 i=inp(sense) and &H40 ' i= bit 6 of the sense ... etc.
80 if i ... etc ....
<nbucska@pcperipherals.com>
RE: USB 3-button footpedal programming in C++