USB-footswitch

Just starting out? Need help? Post your questions and find answers here.
Susan20
User
User
Posts: 19
Joined: Fri Feb 29, 2008 1:10 pm
Location: Berlin

USB-footswitch

Post by Susan20 »

Hi, it is not too difficult to implement a 8-button-gamepad under PB. I'm so impressed by the power of PB, that I want more! The other day I connected a simple usb-footswitch to my computer being immediately recognized by Windows (must be kind of a standard device). Is it possible under PB 4.10 to detect actions like hitting the footpedal? In other words: Is there a simple way to use this pedal as a device similar to a joystick/gamepad? - Susan
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Yes it can!

Purebasic only supports the "basic" buttons, but you can use the code from >>here<<.
I've tested it with my game pad... 16 buttons and works fine !

I assume that a footpedal is nothing more that a standard joystick, that uses some of those 16 buttons ;) ...
Susan20
User
User
Posts: 19
Joined: Fri Feb 29, 2008 1:10 pm
Location: Berlin

Post by Susan20 »

Thanks for the quick answer. The code does work with my 8-button-gamepad, but unfortunately not with my footpedal.
User avatar
dhouston
Enthusiast
Enthusiast
Posts: 430
Joined: Tue Aug 21, 2007 2:44 pm
Location: USA (Cincinnati)
Contact:

Post by dhouston »

Many footswitches emulate a mouse. What make/model footswitch?
Susan20
User
User
Posts: 19
Joined: Fri Feb 29, 2008 1:10 pm
Location: Berlin

Post by Susan20 »

In deed there are foot switches which emulate a certain joystick button or a mouse wheel. However, for those you need a certain configuration software. In my case though the PB-Standard-Devices like mouse and joystick won't work due to a missing configuration software.
Post Reply