Re: What driver for XBOX 360 Joystick Controller & Arduino?
In HID devices, every control has an ID called Usage. When a control is being manipulated, the HID device will generate activity reports that specify which Usages the reports are for and what the values are. For example, a real Xbox controller will report a device descriptor with the following info:
In this case, UsagePage=1, Usage=5 means Generic Desktop Page/GamePad. It also reports there are 6 analog values, probably 2 for the left stick axes, 2 for the right stick, and 2 for the two triggers. For example, the Xbox left stick X-axis will generate reports with values for Usage 0x30 (X) and the left stick Y axis will generate values for Usage 0x31 (Y). The left stick is the same for both Xbox and Logitech. But the right stick has different mappings between Xbox and Logitech. I don't have the Logitech with me right now so I can't check its descriptor). The switch on the back is to tell the Logitech gamepad to generate reports that maps the controls similar to the Xbox controllers.