How to Access Some Buttons on Controller Through Code


#1

We’re using the basic Logitech Fakebox controller that came with the Rookie Starter Kit. Do any of you know the numbers that I have to put into the code to check the status of the D-pad, Start, and Back buttons? I thought Back would be 12 and Start would be 13, but I get an error saying those buttons do not exist when I deploy the code. I have no inkling of what the D-pad numbers would be.


#2

Here’s a chart. It depends on the mode selected:
http://www.team358.org/files/programming/ControlSystem2015-2019/images/Logitech-F310_ControlMapping.pdf


#3

If you open up the driver station to the inputs tab, you can click each button on any controller and see what number it is


#4

Wow, thank you so much! This is exactly what I needed. I hope your team didn’t find all those values through trial and error…


#5

Most of them don’t have numbers next to them, though, which was the trouble.


#6

Wait. Right now I have the “A” button as 6, and it works. Is there another mode?