Ps3 controller for GoPiGo

Dear Engineers

we have a error when we connect the ps3 controller to the GoPiGo

Please could You assist

At Step 4 of the instructions in

The error showing is “Invalid joystick number”

Regards, Adriel

Hey Adriel,
Are you using a dualshock3 controller. Can you post the output of the sixpair script and which raspberry pi are you using.


I am using a P3

The error is this -

pi@dex ~/Desktop/GoPiGo/Software/Python/Examples/PS3_Control ls PS3-controller-for-raspberry-pi.jpg ps3.pyc sixpair pi@dex ~/Desktop/GoPiGo/Software/Python/Examples/PS3_Control ./sixpair
usb_claim_interface: Operation not permitted
pi@dex ~/Desktop/GoPiGo/Software/Python/Examples/PS3_Control sudo ./sixpair Current Bluetooth master: 00:15:83:e7:d4:63 Setting master bd_addr to 00:15:83:e7:d4:63 pi@dex ~/Desktop/GoPiGo/Software/Python/Examples/PS3_Control python
Traceback (most recent call last):
File “”, line 39, in <module>
p=ps3() #Create a PS3 object
File “/home/pi/Desktop/GoPiGo/Software/Python/Examples/PS3_Control/”, line 56, in init
ps3.joystick = pygame.joystick.Joystick(0)
pygame.error: Invalid joystick device number
pi@dex ~/Desktop/GoPiGo/Software/Python/Examples/PS3_Control $

Hey adriel,
Can you try following the guide here: and check if that works for you. Also which Pi are you using with this.