We are going to be taking out robot to some demonstrations, and I have implemented a half power drive train, so the kids have time to jump out of the way of their friends driving, and I also have an override so that we, the team, can drive it to its full potential. We are using an xBox 360 controller, and one of the mentors thought it would be cool if there was a way to have the lights around the xBox button to light up when we have the overdrive toggled on. Any help is appreciated. Thanks in advance.
->Mike
As far as I know the light ring is controlled by the USB hub on the computer and is inaccessible through any FRC programming. Perhaps there is third-party software that allows you to manipulate the lights? Quick googling hasn’t come up with anything, but there might be something that I’m missing. I doubt you could interface with your robot code unfortunately. Maybe I’m unimaginative?
I’d say inaccessible through any programming… or any programming short of making some hardware modification and rebuilding drivers for that mod. I found this link and the “ring of light” for the “guide” button appears to be triggered by internal events outside the scope of xinput, direct input, or HID. If anyone figures out how to manipulate this… my hat is off to you.
I made a quick look though here. It seems the light configuration is set automatically by the driver/API. The only thing I saw that could be controlled was the vibration function.
We’ve read controller values directly in the LabView dashboard, although we did have some issues which may or may not have been related. LabView gives you the ability to communicate over teh USB interface so you may be able to do it through that method.
I posted a thread on how to accomplish this, check it out here
The original post asks to manipulate the ring of light for the guide button to indicate an override (or overdrive) toggle state.
Thanks for posting this rumble feedback xinput link anyway… I’ve found it very interesting.
My bad, I believe the answer for the LEDs was provider above already. The LEDs are controlled by the driver, and therefore cannot be controlled.
Here is a little more concrete evidence.
Multiple Controllers
The XInput API supports up to four controllers connected at any time. The XInput functions all require a dwUserIndex parameter that is passed in to identify the controller being set or queried. This ID will be in the range of 0-3 and is set automatically by XInput. The number corresponds to the port that the controller is plugged into, and is not modifiable.
Each controller displays which ID it is using by lighting up a quadrant on the “ring of light” in the center of the controller. A dwUserIndex value of 0 corresponds to the top-left quadrant; the numbering proceeds around the ring in clockwise order.
Applications should support multiple controllers.