XBox controller with C#

Just testing the interface with an XBox controller for the a Boxing punch counter app, so these are a few notes of what I’m using.

Main drivers for the XBox controller are downloaded from the Microsoft site, http://www.microsoft.com/hardware/en-us/d/xbox-360-wireless-controller-for-windows I used the 32 bit version with Windows XP and I tested with the wireless version. Under another test with Windows 7, the drivers updated automatically when the wifi section was plugged into the USB port.

I looked at some examples and decided to use the SlimDX open source C# interface, rather than a full XNA library. It’s lightweight and we don’t need all the 3D facilities of the full XNA sdk. We’ll start with that and see how it goes. The SDK details are here, http://slimdx.org/ and it may be downloaded here, http://code.google.com/p/slimdx/downloads/detail?name=SlimDX Runtime for .NET 2.0 28September 2011%29.msi This needs to be installed. It’s a .msi file. They may be producing an update for .Net 4.0 soon, so keep a check.


This is a simple example that works from this guy, http://visualcsharp.webs.com/projectdownloads.htm

Advertisements

~ by ianm on November 17, 2011.

4 Responses to “XBox controller with C#”

  1. Had trouble installing SLimDX, on a machine with only .Net 4 installed, so just tried the install for the SDK; just before it fails it should have copied all the right DLLs to the Program Files area, so copy them somewhere else because after it fails it tidies up and deletes them all. You can then dig down to the right DLL. I’m now using the .Net4 dll and am having no problems.

  2. […] https://happyt.wordpress.com/2011/11/17/xbox-controller-with-c/ […]

  3. Is it possible to detect the “guide button” on a xbox controller.
    By my observations, it does not seem to be possible?

  4. I’m not sure. I only used the lights to see that I was connected.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: