Basically I use a mouse under a treadmill. The mouse is hooked up to a PC, and when I walk on the treadmill I can move a character in a PC game...
What it boils down to is that I was thinking creating my own hardware instead of fiddling around making the standard HID mouse work. libUSB issues, and every mouse connected will be read by from games, which is an issue because that isn't what I want the mouse under the treadmill to be used for.
So, I was thinking that if I do this in hardware, things would be a lot easier. However, I need help with the hardware parts. Anyone here that can help me with that?
I just need something like a "mouse" at the reading end. (Optical, IR, whatever). Maybe a micro controller or something that can pretend to be a XBox 360 controller (and more precisely the left analog stick). And then hook it all up with USB to PC. So, I want to map the "mouse" movement to the analog stick. This will be done in software. I'm guessing Arduino could be good to solve this, but I have no idea what hardware to use...
An ordinary Arduino is connected to the host PC using a chip from a company called FTDI, called a USB to USART (serial).
The Arduino's USB connection does not look like a mouse, and can not be made to look like one.
If you want to make a USB device, then look at thigs like the Teensy, or AT90USBKEY or Micropendous.
They use Atel processors, like the Arduino, and the Teensy has some support for using Arduino IDe and programs.
So, unless yo have access to the source code, or can write device drivers and install them on your gaming machine, an Arduino might not look like an appropriate USB device for the game.
No, I don't have src code. The idea is to hook it up to games such as "Just Cause 2" (which apparently only supports mouse-keyboard or a xbox 360 controller) I was hoping I could fool Windows somehow to think my device was a xbox 360 control.
I think you'll have to make something which looks like a USB mouse, and that is not what an Arduino looks like out of the packet. You are going to have to have some electronics for that.
As well as the hardware which can be programmed to look like most USB devices, you should also have a look at V-USB.
Like the hardware I posted, it uses Atmel processors, so some of your Arduino skills will be useful.
It adds the ability to implement a range of USB devices in software, so it is cheaper than the hardware solutions. It's downside is it is doing things in software which must happen on time, so it is a bit harder to integrate with sensors.
I must admit, I'd probably use a Hardware solution like a Teensy. It is low-cost, and has enough hardware for USB to make the problem easier to solve.
Yea, thanks for the heads up for Teensy! I mailed the guy to see if he can help me. Will continue my research in the meantime thought...
Also, I'm not sure it's good idea to make it look like a mouse, because one of the issues I have is that games doesn't care which mouse it get its data from. And the mouse is usually used to change direction in FPS games.
Also, I'm not sure it's good idea to make it look like a mouse, because one of the issues I have is that games doesn't care which mouse it get its data from. And the mouse is usually used to change direction in FPS games.
So what is the data going to do in the game?
Where does the game currently get its data (for your purpose) from? Is it only possible with an X-Box 360 controller?
For analog input (to the game) I think to emulate/simulate a Xbox 360 controler is the easiest (left analog stick). That way I can just plug the thing in, and it will work automatically. Actually, a benefit from this also means it would probably also work on a real xbox unit!
I thought the Xbox-360 controllers were wireless. Are there wired ones too?
Have you a link for a page which describes what the signals from an XBox controller look like? I have a friend who loves his Xbox, so he might be interested in making plug-in gizmo's too.
What comes up on your USB sniffer when you first plug the controller into the PC? The first part of the dialogue over USB will identify the controller to the PC (you likely know this if you have a USB sniffer).
I'd assume it is some form of HID device?
Maybe I can just send such data myself from my own hardware device?
Yes, as long as you aren't planning on selling this ...