zeth / inputs

Cross-platform Python support for keyboards, mice and gamepads

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PS3 Controler via Bluetooth

luizoti opened this issue · comments

My controler work via USB, but not via bt, as I understand it, the script looks for or controls via usb on the paths below, but via bt or controls does not appear on the same path.

USB paths:
/dev/input/by-id/usb-Sony_PLAYSTATION_R_3_Controller-event-if00
/dev/input/by-id/usb-Sony_PLAYSTATION_R_3_Controller-joystick
/dev/input/by-id/usb-Sony_PLAYSTATION_R_3_Controller-event-joystick

Error:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/inputs.py", line 3676, in get_gamepad
gamepad = devices.gamepads[0]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/luiz/HD/posinstall/PycharmProjects/ds3_inputs/ds3_inputs.py", line 25, in
main()
File "/home/luiz/HD/posinstall/PycharmProjects/ds3_inputs/ds3_inputs.py", line 12, in main
events = get_gamepad()
File "/usr/local/lib/python3.7/dist-packages/inputs.py", line 3678, in get_gamepad
raise UnpluggedError("No gamepad found.")
inputs.UnpluggedError: No gamepad found.

Same problem with a DS3 bluetooth joystick. It is not detected.