CSiEra

CSiEra

I know I know nothing.

Using gamepad in Psychopy.

Recently, I have been using Psychopy to create several experiments, one of which involves collecting feedback from participants using a gamepad.

In the past, we primarily used keyboards, but there were too many keys and it was inconvenient for some elderly participants. Gamepads have fewer buttons and are designed for comfort when held, making them a perfect device for tasks that do not require high time precision.

The gamepad I am using is a Huitong gamepad that I purchased a long time ago. It looks very simple. I now use it for participant feedback (without measuring time) by connecting it to the computer via Bluetooth, which is very convenient. The gamepad also comes with a data cable for wired connection to the computer, which should have lower latency than Bluetooth.

bb3f6beb85ca14c250896b1b0a36641

Using this gamepad with Psychopy encountered a slight issue: the built-in joystick library in Psychopy seems to have better support for Xbox gamepads. Although this gamepad has a more common interface, I gave up on this approach after testing it for a while without success.

After searching, I downloaded a software called "Keysticks" from https://keysticks.net/. Simply put, this software can map the detected gamepad buttons to keyboard keys. Therefore, I just need to add keyboard detection functionality in Psychopy to use the gamepad normally.

Another advantage of using this software is that I can map only the necessary keys to the gamepad buttons, so even if the participant accidentally presses unused gamepad buttons, there will be no response, reducing the probability of misoperation.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.