Alternatively the following commands should download all of the necessary software: In order to set QtSixA up properly we recommend following this guide by Raspians.
Next you will need to setup some software to talk with the PS3 controller, we recommend using QtSixA, also known as sixad.
Setup for Wheezyįirst you need to get yourself a USB Bluetooth dongle for the Raspberry Pi and you will need a USB mini cable, the same type you use to charge the PS3 controller. The numbers shown should change as you move the joysticks around, if so everything is working properly. Finally you can test the PS3 controller is working using the device name from the last command with jstest:
You can then use the following command to list the connected joysticks:Īt least one should be shown, probably /dev/input/js0. The LEDs should briefly flash, then just one LED should remain lit.
Once you have logged back in press the PS button to test the connection. Device 38:C0:96:5C:C6:60 Trusted: yesĬhanging 38:C0:96:5C:C6:60 trust succeededįinally exit the Bluetooth configuration tool and restart the Raspberry Pi. If everything went well you should see something like: Use the trust command with the MAC address from earlier, in our example: Once we have seen the UUID values we can use the trust command to allow the controller to connect on its own. If the controller stops trying to connect press the PS button again before using the connect command again. When it works you should see something like this:Īttempting to connect to 38:C0:96:5C:C6:60 This may take several attempts, you can repeat the command using ↑ then ENTER. You are trying to get the Bluetooth to try a connection and get a UUID number. We need to use the connect command with the MAC address shown, in our example: In this example it is 38:C0:96:5C:C6:60 With this we can attempt to make contact with the controller. You will need to make a note of the MAC address displayed, it is the sequence with ' :' symbols. You should see some log lines like this at a regular interval: Now you can press the PS button on the controller and it should attempt to talk to the Raspberry Pi.
If you cannot run bluetoothctl you may be running an older version of Jessie and might need to install the old Bluetooth module using: sudo apt-get -y install bluetooth after which you should restart the Raspberry Pi and try again. Next we start the Bluetooth configuration tool and set the dongle so it can be seen by the controller: Now disconnect the controller from the USB cable. Setting master bd_addr to 00:15:83:0c:bf:ebĭisplayed on the terminal.
The sixpair code should re-configure the controller to talk with the dongle, if it worked you should see something like:Ĭurrent Bluetooth master: 00:15:83:0c:bf:eb We will also restart the Raspberry Pi to ensure the Bluetooth service is running: Plug the controller into the Raspberry Pi with the USB cable and the Bluetooth dongle if you have not already. Next we need to tell the PS3 controller it is meant to be connecting to the Raspberry Pi. Sudo apt-get -y install libusb-dev joystick python-pygame We need to download some packages to allow us to use both the Bluetooth and joystick functions: Our guide here is heavily based on BaseBot's Playstation 3 Controller guide with some slight adjustments to work with a clean install of Jessie Lite and our scripts. Setup for Jessie and Jessie Liteįirst you need to get yourself a USB Bluetooth dongle for the Raspberry Pi and you will need a USB mini cable, the same type you use to charge the PS3 controller.
Check out our How to connect a PS3 remote to the new Raspberry Pi Zero W guide to get setup with the GUI :) Alternatively keep reading the Jessie instructions below to setup your PS3 controller from a terminal instead.
If you have a Pi 3 or Pi Zero W then you already have the Bluetooth built-in to the board, otherwise you will need a USB Bluetooth dongle. If you are using a version of Raspbian which is running Pixel then you can setup the PS3 controller using the GUI.
Setup for the Pi Zero W and Raspbian running Pixel If you wish to use a PlayStation 3 controller to control your Raspberry Pi robots then here are some details which may help.