Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

USB 3-button footpedal programming in C++

Status
Not open for further replies.

mharpsteVT

Computer
Mar 2, 2004
1
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.
 
Replies continue below

Recommended for you

Using P's printer port & any interpreted or compiled BASIC:

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>
 
What OS where you targeting? Where you looking to write a miniport driver for the USB device?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor