how do I program an interface in windows to interact with my arduino gamepad? [closed]

  arduino, c++

The whole thing is completed however there is only one thing that I have not decided on…

and that is the packet formatting. Since the data will be transferred to the PC i have to fill in some gaps because with the knowledge that i currently have i highly doubt i will be able to do this properly…

=======

background:

The controller is just a generic button presser ( it actually lights up a bulb before being sent to it’s respective address bus for debug purposes)

The arduino sketch internally holds flags in an 8-bit placeholder variable for now.

I only know how to read this data using the arduino serial monitor

=======

so what do i need to do then?

structure the USB packet data in a protocol friendly way and actually understand what I’m doing.

I would love to think i could just send /stream the button data to the PC out in the open, but i really doubt that will work with the lack of knowledge that I have over USB transfer.

and im pretty sure USB requires some sort of handshake magic prior to that

  1. Figure out how to decode the data sent by the arduino ( shouldn’t be to hard up to this point since it should be just basic libusb)

  2. implement a mini driver (probably using libusb) to handle the reading of the USB packets

  3. and the icing of the cake. add the joysticks and get windows to behave as if the device was an xbox 360 controller. ( you know, getting it to show up on it’s internal list of game controllers and the like, editing registry, etc, etc)

Source: Windows Questions C++

LEAVE A COMMENT