Control Diddyborg V2 with wired Xbox 360 controller
Forums:
Hello,
I bought a Diddyborg V2 with a Raspberry Pi 3 B+. I would like to control it through a wired Xbox 360 controller. However, when I use the script provided on the PiBorg website, the controls don't work properly. It's because they suit the PS3 controller. So I have to modify the "# Settings for the joystick" part, but I don't know how to find the right values for my controller. Could you help me please ?
Have a nice day and thank you in advance !
piborg
Tue, 05/07/2019 - 19:45
Permalink
Xbox 360 controller
I have some old values which may be correct here: Xbox 360 button numbers
If they are not right let me know :)
a.elghozi
Thu, 05/09/2019 - 09:22
Permalink
Xbox 360 controller
Thank you so much ! I tested your controls and I found that Right stick left-right is 3 and Right stick up-down is 4.
piborg
Thu, 05/09/2019 - 18:07
Permalink
Great :)
Glad to hear it helped.
I have updated the table with the correction, thanks for letting me know :)
a.elghozi
Wed, 05/15/2019 - 13:51
Permalink
Final testing
I tested all the axis and buttons and on my Xbox 360 controller (which is maybe different from yours, if it is an xbox one controller or something else). Here are the results :
Axis :
leftStickLeftRight=0
leftStickUpDown=1
rightStickLeftRight=3
rightStickUpDown=4
LT=2
RT=5
Buttons :
leftStickClick=9
rightStickClick=10
xboxButton=8
A=0
B=1
X=2
Y=3
LB=4
RB=5
back=6
start=7
piborg
Wed, 05/15/2019 - 20:07
Permalink
Thanks :)
That is helpful to know, thanks :)
We did test with a 360 controller, but it seems like the values from older copies of Raspbian are different from recent versions. We saw the same thing with PS3 and PS4 controllers as well.