View unanswered posts | View active topics It is currently Mon Dec 22, 2014 2:45 pm






Reply to topic  [ 5 posts ] 
What driver for XBOX 360 Joystick Controller & Arduino? 
Author Message
Rookie

Joined: Sat Sep 07, 2013 9:04 pm
Posts: 1
Location: San Antoniio, Texas
Post What driver for XBOX 360 Joystick Controller & Arduino?
I can select the Controller (Gamepad for Xbox 360) [Gamestop equivalent XBOX 360 BB-070] and configure the Joystick settings but the #include "JoystickDriver.c" does not seem to support this platform using the Arduino UNO. It errors out during compilation.

Is it even possible to use the Controller (Gamepad for Xbox 360) with an Arduino UNO?

Richard


Sun Sep 08, 2013 12:32 am
Profile
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: What driver for XBOX 360 Joystick Controller & Arduino?
I think "JoystickDriver.c" only supports DirectInput. XBox controllers use XInput.

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sun Sep 08, 2013 1:18 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1372
Post Re: What driver for XBOX 360 Joystick Controller & Arduino?
I think it supports HID devices (Human Input Devices). Since Windows has built-in HID support, you don't need any other drivers.


Sun Sep 08, 2013 7:38 pm
Profile
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: What driver for XBOX 360 Joystick Controller & Arduino?
Really? Then what does the little switch in the back of the FTC joysticks do... :oops:

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sun Sep 08, 2013 8:33 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1372
Post Re: What driver for XBOX 360 Joystick Controller & Arduino?
Ernest3.14 wrote:
Really? Then what does the little switch in the back of the FTC joysticks do... :oops:

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:
Quote:
Vendor/Product/Ver=0x045e/0x02a1/0x0000
ProductString=<Controller (Xbox 360 Wireless Receiver for Windows)>
UsagePage/Usage=0x0001/0x0005
NumLinkCollections= 4
InputReportLen=15, OutputReportLen= 0, FeatureReportLen= 0
NumInputButtons= 1, NumInputValues= 6, NumInputIndices=16
NumOutputButtons= 0, NumOutputValues= 0, NumOutputIndices= 0
NumFeatureButtons= 0, NumFeatureValues= 0, NumFeatureIndices= 0

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.
Quote:
Usage ID Usage Name
00 Undefined
01 Pointer
02 Mouse
03 Reserved
04 Joystick
05 Game Pad
06 Keyboard
07 Keypad
08 Multi-axis Controller
09-2F Reserved
30 X
31 Y
32 Z
33 Rx
34 Ry
35 Rz
36 Slider
37 Dial
38 Wheel
39 Hat switch
3A Counted Buffer
3B Byte Count
3C Motion Wakeup
3D Start
3E Select
3F Reserved
40 Vx
41 Vy
42 Vz
43 Vbrx
44 Vbry
45 Vbrz
46 Vno
47-7F Reserved
80 System Control
81 System Power Down
82 System Sleep
83 System Wake Up
84 System Context Menu
85 System Main Menu
86 System App Menu
87 System Menu Help
88 System Menu Exit
89 System Menu Select
8A System Menu Right
8B System Menu Left
8C System Menu Up
8D System Menu Down
8E-8F Reserved
90 D-pad Up
91 D-pad Down
92 D-pad Right
93 D-pad Left
94-FFFF Reserved


Mon Sep 09, 2013 11:05 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.