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 http://www.dexterindustries.com/GoPiGo/projects/python-examples-for-the-raspberry-pi/raspberry-pi-ps3-control-with-gopigo-robot-example/

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.

-Karan

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_gpg_example.py ps3.py ps3.pyc Readme.md 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 ps3_gpg_example.py
Initializing
Traceback (most recent call last):
File “ps3_gpg_example.py”, line 39, in <module>
p=ps3() #Create a PS3 object
File “/home/pi/Desktop/GoPiGo/Software/Python/Examples/PS3_Control/ps3.py”, 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: http://booting-rpi.blogspot.in/2012/08/dualshock-3-and-raspberry-pi.html and check if that works for you. Also which Pi are you using with this.

-Karan