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.

Recommended Answers

All 7 Replies

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.

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?

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".

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.

you are getting ahead of yourself. READ THE MANUAL.

*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?

just found this on that link

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.