OS : Windows 7
PsychoPy version: 1.84.2
Standard Standalone? Yes
What are you trying to achieve?:
I have a question about how to send response triggers from a testing computer to an EEG recorder in a task designed in Builder mode . I’m using a direct parallel port connection to connect the testing computer and EEG (Biosemi EEG system).
In my task, participants have to press a key (1 or 2) in order to determine if the stimulus presented in the screen is a word or a non-word (the responses are collected using Keyboard component). I used the I/O component for sending the triggers associated with the type of stimulus and created a column [ID] in my excel file which determine the integer [111, 112, 211, etc.] for each type of stimulus (I have different conditions within word and non-word stimuli but I’ve simplified it for the purposes of solving the trigger issue).
The problem is that, while I’m able to send triggers for each stimulus with the I/O component (screenshot below) -and therefore I’m sure that there is no problem between the parallel port and the EEG-, I couldn’t find a solution for sending the triggers associated with the participant’s response.
What did you try to make it work?:
I have used the Code component inserted in Builder, however this does not generate any trigger.
In code properties, I typed this:
Begin Experiment
from psychopy import parallel
parallel.setPortAddress (0x0378)
Begin Routine
if len(key_resp_3.keys)>0 and response.corr:
if key_resp_3.keys[0] == corrAns:
parallel.setData(98)
else:
parallel.setData(99)
End Routine
parallel.setData(0)
What specifically went wrong when you tried that?:
While the triggers for type of stimulus created from the I/O component are properly sent, the response triggers –created from the Code component- are not generated.
What should I do/change (in the Code component or wherever) to get the response triggers sent through the parallel port?
Any thoughts/comments/advices would be veeeery appreciated!
Many thanks!