I am creating a stroop task. Using words blue green red, and colors blue green red. We have both congruent and incongruent trials. participant has to press key corresponding to the color of the word.
40 trials, for each trial 3 screens are shown to user:
We first have a pre_stim screen with a “+” in the middle (1 sec long).
Second screen is our Target screen where the word shows up (2 sec long). While this screen with the word is up the user has to choose a key corresponding to the color of the word they see, either ‘r’ ‘g’ or ‘b’. If no response just move on.
Third screen is a Post_Stim screen with nothing on it (1 sec long).
then move on to next trial, same sequence.
I am trying to send a specific trigger for when each screen initially pops up in a trial. I am also sending a trigger for the response of the user - if they respond correctly it would be one type of trigger, if they responded incorrectly it would be a different type of trigger.
So in total 5 different trigger but 4 would show up for each trial.
I have the experiment set up in builder mode and have added code components for the different triggers but the screen onset triggers are not showing up at all on my Brainvision EEG simulator. The correct and incorrect triggers are being displayed but they are not showing up correctly … for example, even when I press the correct keyboard button sometimes the incorrect trigger comes up on the screen.
If anyone has any ideas of how to get the onset screen triggers to show up or to fix my correct/incorrect triggers, would greatly appreciate the input!
I am adding a screenshot of my trial routine set up. As well as my code currently.
I was thinking, for the initiating screen triggers, I could use the onset time data psychopy builder saves internally for each component… something like what I wrote below but when I added this to my code the triggers did not show up either way:
if ‘Pre_Stim’ in locals() and Pre_Stim.status == STARTED and tThisFlip >= Pre_Stim.tStart and tThisFlip < Pre_Stim.tStart + frameTolerance:
port.write([0x01]) # Trigger for “+” screen
time.sleep(PulseWidth)
port.write([0x00]) # Reset trigger