Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1241

Python • Python3 code for ps4 controller mapping

$
0
0
IMG_1159.jpg
IMG_1160.jpg
Hello,

I am having errors with this line of code that I've written in an attempt to map PS4 controller buttons. I'm connecting a Ps4 controller via USB to a Raspberry pi 4 using a Pygame library. The code is so the D-pad Up or down button will bring a GPIO pin high/low. Also, I'm not entirely sure what the expected output should be from the controller. Jstest indicated a simple On/Off.

Any advice would be appreciated as I'm new to Python programming.
Thank you.

Statistics: Posted by rkcruit — Tue Jul 02, 2024 10:15 pm



Viewing all articles
Browse latest Browse all 1241

Trending Articles