Interfacing USB Game Controller with VB6
Hi guys,
I posted my robot in the completed projects forum: http://forums.parallax.com/showthread.php?p=676444
A friend of mine showed me his USB game controller for the PC like in the attached image and suggested that it would be awesome to have that control the rover and the robotic arm.
Since my remote control software is written in Visual Basic, I can't figure out how to interface the USB game controller with VB6. Any help in this regard would be highly appreciated. I am documenting my robot right now so that others can benefit from this. You can read it all here:
www.aaqilkhan.blogspot.com
Game Controller in VB6 ?![confused.gif](http://forums.parallax.com/images/smilies/confused.gif)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E=mc^2
Post Edited (Aaqil Khan) : 9/19/2007 11:12:24 PM GMT
I posted my robot in the completed projects forum: http://forums.parallax.com/showthread.php?p=676444
A friend of mine showed me his USB game controller for the PC like in the attached image and suggested that it would be awesome to have that control the rover and the robotic arm.
Since my remote control software is written in Visual Basic, I can't figure out how to interface the USB game controller with VB6. Any help in this regard would be highly appreciated. I am documenting my robot right now so that others can benefit from this. You can read it all here:
www.aaqilkhan.blogspot.com
Game Controller in VB6 ?
![confused.gif](http://forums.parallax.com/images/smilies/confused.gif)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E=mc^2
Post Edited (Aaqil Khan) : 9/19/2007 11:12:24 PM GMT
Comments
does your usb game controller show up as a game controller in windows?
if so, post back, i can help you [noparse]:)[/noparse]
Yes it does. I can see the USB game controller in Windows' Device Manager list.
I will wait for your response. Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E=mc^2
Here's the code I use in vb.net 2008 Express Edition(I think you have vb 6 but I don't have that one on this computer)
I use Microsoft Direct X, Looking at the code now i realize you probably can't use this in vb6, If i get time tonight, i'll try to port it
This code has been customized for the use of a microsoft xbox wireless controller(Hence the compensation for the dead zone)
This is before the namespace
Now we are in the namespace
In the "Public Class MainClass":
This next code is in the namsepace but not in the mainclass sub
As I said up top, If i get time i'll try to port this to visual basic 6 tonight.
I hope I can help, i've looked at your web link and I was blown away at how profeshional your vb program looks! I've been having a lot of trouble sending anything but simplistic data packets to the stamp, I'd love to see how you do it.
-Regards
Post Edited (DiablodeMorte) : 9/20/2007 12:56:59 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E=mc^2
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support