If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): most recent
Standard Standalone? (y/n) If not then what?: yes
What are you trying to achieve?: For simplicity sake, let’s say I am simply trying to get 2 stimulus triggers sent to my EEG system. When the participant sees stimulus A, it sets the port to 2. When the participants sees stimulus B, it sets the port to 3. The port numbers in specific are not important, it’s just important that they are different.
What did you try to make it work?: I have tried following various tutorials online to accomplish this. I verified that I am using the correct port address. I installed the necessary drivers to retrieve the port address. I inserted a code chunk where my experiment loop begins (where participants see stimulus A and B repeatedly and randomly). It looks like this
Begin Experiment: from psychopy import parallel
port = parallel.ParallelPort(address = 0xCFF8)
port.setData(0)
Each Frame:
if text == ‘A’:
…port.setData(2)
if text == ‘B’
…port.setData(3)
port.setData(0).
I also added an IO component to the routine. I set the port address, and set start data to 1. I set the duration to 2.5 seconds (which is the length of the entirety of the frame)
What specifically went wrong when you tried that?:
There is no error message, and it appears that the experiment is running, however, no trigger codes are appearing in the EEG file. I am very lost on how to fix this. Does anyone have any advice?