Enable PS3 rumble / vibration using pygame

Can anyone provide the code to enable the rumble / vibration using pygame for Raspberry Pi3 Model B? I want to use the rumble to provide indication from a sensor. Thank you ahead of time.

piborg's picture

Unfortunately we have not had much luck with rumble support with PS3 controllers. You might want to look at how RetroPie gets the functionality to work as a starting point.

I'm currently working on PS4 controller with pygame and want support of rumble. Do you have any luck figuring out how do I use rumble in Pygame for PS4? Is it possible? Anyone succeeded in getting this to work by looking at RetroPie functionality?
Any help is Appreciated. Thank You

Bluetooth pairing of PS3 asking to enter numbered sequences on PS3 controller under stretch version of raspbian when using the gui. The only button shown during this time was "cancel". So, instead, I endevored to use bluetoothctl.
conversely, when I tried bluetoothctl ... etc. it would recognize the controller, but subsequently drop the BT connection with the controller. I could never get any uuid's to display in order to issue the trust command. Need help.
I apologize if this is misfiled...

piborg's picture

It sounds like the Raspberry Pi is getting confused about what type of device the controller is.

It might help if we can get some more detail about this controller. Could you take a screenshot after doing the following:

  1. Power off the Raspberry Pi
  2. Make sure the controller is not attached via the USB cable
  3. Power the Raspberry Pi
  4. Connect the PS3 controller using the USB cable now
  5. Wait a few seconds
  6. Run this command: dmesg

You should see something like the image below with lines talking about the controller being connected.

If you could take a copy / screenshot of the output for us to look at :)

I am including a snapshot as requested.

piborg's picture

Unfortunately the problem you are having is caused by the controller, which is a copy made by Shanwan instead of Sony. These copies seem to work with an actual PS3 console, but they behave strangely when trying to use them with Linux. We have not had much luck getting these controllers to connect so far.

i am not sure if this will help you or not, but this blog sounds promising: Setting up PS3 controllers on Retropie (Gasia/ Shanwan clones), make sure to read all of the pages. It is a bit involved, but if you can get the controller paired then all should be well :)

Subscribe to Comments for "Enable PS3 rumble / vibration using pygame"