If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): Linux Ubuntu 18.04.6LTS
PsychoPy version (e.g. 1.84.x): v2022.1.1
Standard Standalone? (y/n) If not then what?: YES
What are you trying to achieve?:
I want to send EEG-Triggers through a parallel port.
What did you try to make it work?:
Set up the parallel port and defined address; the experiment loads, it finds the port. It tries to lead the first stimulus when also a trigger should be sent and then aborts.
What specifically went wrong when you tried that?:
cortex_obj.inject_marker(value=str(‘2’), label=‘t_marker’, delta_time=delta_time)
NameError: name ‘cortex_obj’ is not defined
The py-code is attached:
experiment_11.3_Triggers.py (64.1 KB)
The cortex_obj is indeed not defined, how and where do I define it?
Thank you so much! Any advice is much appreciated!
Thanks for your question - can I just ask whether you’re building your experiment in Builder view of PsychoPy? If so would you mind attaching the .psyexp file for your experiment so that I can take a look at that?
thanks for getting back - I started out on the builder but then added code, in the coder view, sorry! However, the parallelport and trigger information is all included in Builder style. Would you be able to take a look at the code, though?
here is an experiment file! I am really appreciating any help
experiment_11.3.psyexp (57.1 KB)
So sorry for the delay in getting back to you!
I’ve taken a look at your file - are you using an Emotiv EEG setup? It seems as though you’re trying to communicate with an EEG system twice: once through the parallel port component and again via the Emotiv components. I think that’s why there is no cortex_obj.
I’ve amended the code here to show you what I mean:
experiment_11.3_AMENDED.psyexp (56.2 KB)
If you are using Emotiv, I recommend following these instructions to set up the connection and these to send the markers.