XInput Controller Sample
Glossary Item Box
DirectX SDK: XInput
DSS Interop Samples: Game Controller | Desktop Joystick Sample
VPL User Interface Services: XInput Controller
Microsoft Robotics Developer Studio | Send feedback on this topic |
XInput Controller Sample
This sample service provides access to an Xbox 360 controller such as an Xbox GamePad.
This sample is provided in the C# language. You can find the project files for this sample at the following location under the Microsoft Robotics Developer Studio installation folder:
Samples\UX\XInputGamepad
Contents
- Background
- Running the XInput Controller Service
Prerequisites
Hardware
You need an Xbox Gamepad or other XInput controller for this sample to work. You can use a wired Xbox controller (with a USB cable) or a Wireless controller (with an Xbox Wireless Receiver for Windows).
Software
This sample is designed for use with Microsoft Visual C#. You can use:
- Microsoft Visual C# Express Edition
- Microsoft Visual Studio Standard, Professional, or Team Edition.
You will also need Microsoft Internet Explorer (or web browser of your choice).
Background
XInput is an Application Programming Interface (API) that allows applications to receive input from the Xbox 360 Controller for Windows. Controller rumble effects and voice input and output are supported. The XInput Controller sample exposes an XInput Controller as a DSS service.
Getting an Xbox 360 wireless controller to work with RDS can be complicated if you have previously paired it with an Xbox. You should consult the discussion forums for the latest information. A wired (USB) controller works with no problems.
Note that the Xbox 360 controller will also work with the GameController service as a joystick.
Running the XInput Controller Service
Start the DSS Command Prompt from the Start -> All Programs menu.
Start a DssHost node:
dsshost /port:50000 /t:50001"
Point your Web browser at the Control Panel, start the XInput Controller service.
https://localhost:50000/controlpanel
Go to the directory and look for the service instance to show up:
https://localhost:50000/directory
You can inspect the service state by clicking on the link representing the XInput Controller service instance. The XInput Controller can be used in connection with the Simple Dashboard service to drive a robot, real or simulated.
Summary
This sample explains:
- Background
- Running the XInput Controller Service
See Also |
DirectX SDK: XInput
DSS Interop Samples: Game Controller | Desktop Joystick Sample
VPL User Interface Services: XInput Controller
© 2012 Microsoft Corporation. All Rights Reserved.