943,737 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1764
  • C++ RSS
Jan 17th, 2008
0

Joypad to Text interface... How?

Expand Post »
This is going to sound wierd at first, but I found a really cool usb controller. Let's see if I can find a link to it... here it is

Now this is the wierd part - the first thing I thought when I saw this was "how sweet would it be to program an interface so that each button can actually type out a C++ command for me?"

15 commonly used commands, then I could use the d-pad as a modifier to have 15 * 8 = 120 more commands and/or shortcuts. Total 135 commands on one hand. Can you imagine how fast that would make programming, er, well, anything?

Now the heavy stuff... How would I do it? I can't just use the cd that comes with it, I have linux, and I doubt the cd that came with it would allow me to go to text anyways. How does one go about programming a device interface? I'm only experienced in C++ so I decided to go here, since there are several forums I could've gone to for this.
Reputation Points: 46
Solved Threads: 2
Posting Whiz in Training
FireSBurnsmuP is offline Offline
237 posts
since Sep 2006
Jan 17th, 2008
0

Re: Joypad to Text interface... How?

Quote ...
PC and Mac compatible
IMO it is not compatible with linux, but could be wrong. Do you actually have one of those devices? The CD must tell you how to program it afterall that's one of its advertised features.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Jan 17th, 2008
0

Re: Joypad to Text interface... How?

No, I'm getting one. And Nothing says "linux compatible" on the box. NOTHING. I'm asking how one would go about programming an interface for a peripheral device like this one. What libraries? Would I be programming a driver of some kind first? If so, where would I get help doing that?
Last edited by FireSBurnsmuP; Jan 17th, 2008 at 4:53 pm.
Reputation Points: 46
Solved Threads: 2
Posting Whiz in Training
FireSBurnsmuP is offline Offline
237 posts
since Sep 2006
Jan 17th, 2008
0

Re: Joypad to Text interface... How?

The manufacturer will provide the libraries (if there are any) and interface API instructions. You'll just have to read their manual to find out how to do it. The devices I worked with did not have libraries, but just a set of command that the program running on the PC could send it. For example if I sent the command "SPEAK" it might return the string "CHIRP".
Last edited by Ancient Dragon; Jan 17th, 2008 at 4:55 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Jan 17th, 2008
0

Re: Joypad to Text interface... How?

Okay, how would you direct those commands to the device? How do you catch commands from the device? If I can figure out what the keys send to the computer I can pretty much just use cin or something like it.
Reputation Points: 46
Solved Threads: 2
Posting Whiz in Training
FireSBurnsmuP is offline Offline
237 posts
since Sep 2006
Jan 17th, 2008
0

Re: Joypad to Text interface... How?

you are getting ahead of yourself. READ THE MANUAL.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Jan 17th, 2008
0

Re: Joypad to Text interface... How?

*sigh* you're missing the point. sure, I could do it their way and use the software they give me (which I hear works too slowly on macro commands, which is what I'd be using almost exclusively), or I could learn something and do it MY way. Sure maybe it sounds like a drill to the temple for most people, but I WANT to do this.

But I'll have to thank you, Dragon, for pointing out something that sould have been obvious to me - reading the manual. That act did show me the list of equivalent keyboard keys for each button. Now the tough part - what do I do with that? Can I make the program I write affect only one device? If so, how? If not, what do you suggest?
Last edited by FireSBurnsmuP; Jan 17th, 2008 at 5:28 pm.
Reputation Points: 46
Solved Threads: 2
Posting Whiz in Training
FireSBurnsmuP is offline Offline
237 posts
since Sep 2006
Jan 17th, 2008
0

Re: Joypad to Text interface... How?

just found this on that link
Quote ...
System Requirements Windows XP, XP 64-bit, Vista or Vista 64-bit; Mac OS X v 10.2.8 or higher; 35MB hard drive; available USB port; CD or DVD drive; DirectX compatible video card
So its definitely not compatible with your linux box. The first thing you will have to do is learn how to communicate via USB ports. I have not done that myself but others have posted link about it. After that you might have to contact the manufacturer to find out if you can do what you want to do.
Last edited by Ancient Dragon; Jan 17th, 2008 at 6:33 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: class function problem
Next Thread in C++ Forum Timeline: Console commands





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC