[solved] eye link button box (usb gamepad)
Hi,
Is there a way to see in OpenSesame if a button has been pressed on eye link button box (usb game pad)? In Psychtoolbox, one could do something like:
buttonResult = Eyelink('ButtonStates');
if buttonResult ....
I couldn't find this in http://osdoc.cogsci.nl/devices/eyelink/#documentationexamplesandfunctionoverview
But I was wondering if there is an easy way to implement this?
Many thanks,
M
Comments
Hi Martijn,
This is not part of
libeyelink, but you should be able to do this throughpylink, the official EyeLink Python library. The Pylink manual mentions a function calledgetButtonStates(), which suggests that you should be able to do something like this:Not tested though! But something along those lines should work.
That being said, doesn't it make more sense to connect the gamepad to the experimental PC than the tracker? That way you can simply use the OpenSesame
joystickplug-in, or thepygame.joystickmodule.Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks this worked. My reason is that I want the stimulus to disappear as soon as the subject responds. I also want everything in the edf file, so I only have to look at this file after the experiment (Only later did I realize that I could have recorded the response in OpenSesame, and send a message to the edf file).
In case any else is interested. This is the inline code I used: