Increase Joystick sampling rate

Hello all,

I have coded a task using joysticks to capture reaction times. However, by default the joystick’s sampling rate is limited by the screen’s refreshing rate (60-144Hz), which is not enough to precisely capture small differences in RT. Even though buying a very performant screen could be a last resort option, is there any way to increase the joystick’s sampling rate without waiting for the screen to flip? I saw here that iohub was mentioned, how would that work?

Thanks in advance!

I don’t think there’s an iohub implementation yet unfortunately (@sol can speak to that). Until there is, I don’t think there’s a real option to check faster than the refresh rate, for the reasons outlined in that post.

Basically there needs to be something that creates a separate input buffer that is checked more often than the screen refresh. Unless the specific joystick you are using has an internal clock that you can reference through its own API, I don’t think it’s possible at the moment.

What device and operating system? It looks like ioHub supports XInput-compatible devices on Windows, and I’ve gotten more generic gamepad inputs on Linux through Psychtoolbox’s PsychHID, which looks like it should also work for MacOS in principle.

Sorry didn’t mention that! I’m working on Windows and the joysticks are the Thrustmaster T.16000M FCS. I don’t think these are xinput-compatible by default but maybe an emulator like x360ce would do the trick? I’ll try that and let you know.

Thanks for your answer!

Thanks for your answer! I checked, and unfortunately I don’t think the joysticks I use have internal clocks

Hello

I do not know how small your RT differences are, but the article The keyboards are (still) all right in response time experiments | Behavior Research Methods states that the variance of your RT device only reduces your power in certain situations. You could compensate for this loss of power by testing a few more participants or by increasing the number of trials. Perhaps this is a simple avenue to follow?

Best wishes Jens

You could try using core.clock to setup a way for psychopy to call for information from the joystick device.
However, after looking at the the joystick, there doesn’t seem to be any info on the polling rate of the joystick, so I assume that the device is only 100-160 hz? Maybe ask the manufacturer for clarification.
It also has it’s own device customization hub, maybe check in there to make sure there isn’t a setting in there (then also use the core.clock for timing).
I’ll also emphasize @JensBoelte point regarding RTs. We use a lot of eye data and reaction time data (and TMS triggers) in the lab. If anything is going to hamper your RT measurements it will be a) Your device itself (see cedrus and optical based devices)
b) Your USB hub controllers/motherboard
c) Humans. Without extreme practice and expertise human reaction time will not differ meaningful in small windows of RT, especially when it is subframe data; especially when human vision is limited to a handful of “frames” (saccades) per second.

Issac