PS3 Dualshock controller pairing issues

Forums:

I am setting up a PS 3 controller with the raspberry Pi in order to use it to control the DiddyBorg ME I recently purchased.
I followed the guide at https://www.piborg.org/rpi-ps3-help and all seems to me to be installed succesfully.
However when I run the sudo sixad --start & command I don't get the controller recognised, ie the command get stucked and I need to ctrl & C to exit.
I tryed to run sudo ~/sixpair and I get the same address both for Current Bluetooth master and
Setting master bd_addr to.
I also tryed to debug it using jstest /dev/input/js0 but the command can't find the js0 peripheral. Actually in that directory ther is only something called mice.
When I connect the controller to the Raspberry Pi the only feedback the controller gives me are the 4 red led lights blinking and eventually stopping.
The bluetooth dongle is blinking.
Is any one able to help and pointing me to the right direction to solve this issue I am having with the setting of the PS controller?

Thank you

Stefano

piborg's picture

It sounds like sixpair worked successfully, so I am assuming the problem is with sixad.

Could you show us the full output shown when you run sudo sixad --start

sixad-bin[2601]: started
sixad-bin[2601]: sixad started, press the PS button now

this is all I get. The controller at this stage is connected to the Raspberry Pi through the USB cable.
I am just thinking that maybe I need to disconnect it from the USB cable and than re-pair it. What do you think?

piborg's picture

Yes, the controller should be unplugged from the USB before running sixad.

I will add this step to the instructions.

It works! I was sure it would have been something so obvious that I wouldn't have thought about it initially.
What if I wanted to change the button commands now, I didn't seem to find any instruction around?

Any way tahnk you a lot for your help!

piborg's picture

Glad to hear you have it working now.

To change which buttons control DiddyBorg Metal Edition you need to change the values in the "Settings for the joystick" section of the Python script.

All of the numbers for each button are shown in the table at the bottom of this page:
https://www.piborg.org/rpi-ps3-help
For button presses the values you need are in the "Button index" column.
For axis movements (e.g. the joysticks) the values you need are in the "Axis index" column.

Simply change the corresponding variable in the script to the new number.
For example:
buttonSlow = 15 changes the move slowly button to be square,
axisLeftRight = 0 changes the steering control to be the left/right movement of the left stick.

If you want to add a new button you will need to add a new value to the settings list.
To then make it do something you want to add another if block under the"Check for button presses" section.

Subscribe to Comments for "PS3 Dualshock controller pairing issues"