Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Custom inputs for games using switches and USB GPIO
New Posts  All Forums:Forum Nav:

Custom inputs for games using switches and USB GPIO

post #1 of 2
Thread Starter 
So I have had this idea recently, and I'm not really sure how to go about it, I've got some thoughts, so I'll explain what I am wanting to do, then get to the question.

I play games like Arma II and III, and enjoy flying a lot. Games like these, or flight simulators, allow key bindings for all sorts of things, ignition, flaps, fire modes, those sorts of things. I have a Logitech Extreme 3D Pro joystick, which has 12 buttons which can be assigned like any other key, except instead of being a keyboard key like 'a', '1', 'f2', or something like that, they show up as 'Logitech Extreme 3D Pro Button X', or something along those lines. This is good, because I can assign these buttons to aircraft related controls, but for the likes of Arma, I can still have all my keyboard buttons available for infantry related controls.

What I am looking to do is extend this further, and make my own controller of sorts, creating a board like a control panel out of an aircraft with a variety of momentary buttons and switches. Ideally, these can all be their own 'type of input', like the buttons on my joystick, e.g. "Custom Control X". I thought this through a bit, and figured the hardware side of things could be easily accomplished with a USB GPIO setup. One idea was to use a Raspberry Pi, as I know there is already a python library for the GPIO ports on the Pi, though I don't think it is very reliable for real time applications, and secondly, I don't know if the Pi can be set to take GPIO inputs and pass that on through USB. The other idea was to just pick up a straight forward USB GPIO arduino, though I don't yet know how complex it would be to get this to interface with the computer as a type of real time input, especially if I had to write a library for it from scratch.

The main thing I am wondering about is does this sound possible? I am learning Python through my university studies, and would like to think I have learnt enough that if pointed in the right direction I could sort this out provided Python is up to the job. However I don't know if this sort of input thing is something which is easily programmable in the form of a type of driver/program which runs as you use the board, or if this would require the board/game controller to have its own specialized chip on the board itself, or if it would be very complex, or what. So does it sound possible? And how would you go about it?
post #2 of 2
While I don't think you can use custom keys, as in Coustom Controller X, you should take a look at Sparkfun's Guide https://www.sparkfun.com/tutorials/337. If you use an arduino, it has to be one of the more recent Arduinos, such as SparkFun's pro micro, or the Lenardo, because they have a built in usb controller that allows them to look exactly like a keyboard to the computer. I don't know if the Rasp PI can do that.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Custom inputs for games using switches and USB GPIO