Accessing the XBOX One Controller with C# and making it Accessible too
- Posted: Jul 09, 2014 at 6:00 AM
- 8,111 Views
Today's project is a combined hardware and software and hardware project. Many of us are gamers, and being here, there's a good chance you might be a XBOX One owner.
First, you have this cool new controller and really want to use in on your PC and being a dev you want to use it in your app's too?
A few days ago, MS team gives the capability to connect XBoxOne controller to a PC. This is a quite simple action: get the controller use the USB cable and… almost ready.
The great Scott Hanselman explains all of this in a post: how to install the drivers and how to configure the controls. When you’ve already done the Setup you can see the connected remote control and then just configure it.
So at this point, you probably think: what can I do with this? The sky is the limit ;)
In this post I will share a couple of lines that show how to obtain an object of the Controller type in C# and then view the properties for the controller. First thing we could do is to see if we have a device of this type connected to our computer, we can do this with a couple of native APIs or this NuGet pckg and the following code.
For the hardware project, not everyone can use the controllers as expected, due to different challenges. The team at MAKE have highlighted one example of mod'ing the XBOX One controller to be a little more accessible...
In my spare time I enjoy making simple modifications of gaming controllers for people who have special physical needs. Its a hobby that makes me feel good and helps other people. Not a bad trade. If you’ve been following along, you should already have seen part 1 where I added easy to click buttons that activated the “thumbstick click”.
From what I’ve seen, there are two very common issues that people run into. They can’t depress the thumbsticks to make them click, and they can’t use the triggers. In part 1, I have already fixed the thumbstick issue. Now, I’m going to tackle that trigger.
As I stated in part 1, this is for Jay. Jay has explained to me how his hand falls on the controller. We brainstormed for a bit on how to make that trigger reachable for him. Not only did we want to make it easier for him, we wanted to come up with an extremely simple piece that would help people with a wide variety of issues. Together we went through a series of refinements.
Thanks to Jay’s help, we now have an Xbox One trigger extender that can be downloaded from thingiverse or youmagine and printed. Hopefully this helps some people out! If you or anyone you know could benefit from one of these and does not have access to a printer, email me.