| Reference | Downloads | Github

Sending EEG triggers to Brain Vision software

Win 10
PsychPy version 3.2.4

What I want to achieve: I wish to send triggers on onset of each different types of stimulus and onset of response inserted using keyboard.

What works: I created a trigger I/O component in the routine and presenting it at the same time as the stimulus appears. It works for stimulus upto 7 after that it starts again assigning triggers from 1. I guess it is due to Brian Vision contains 16 1-bit digital inputs.

What doesn’t work: I would like to do same when a response was entered. I tried code as shown in the image but it gives me an error: see the third image.

Also I created an I/O component and say that it should send trigger onset of button press, but it does not work. See Image



with 7 pins, you’re limited to 2^7-1 == 127 unique triggers. With 8 pins, 255 triggers. Not sure what you mean by 16 inputs?

Regarding your code snippet:
it fails because you’re assigning the return value of parallel.setPortAddress to p, but this function does not return a parallel port object (and, according to the docs, is deprecated anyway and should not be used).

Try something like:

from psychopy.parallel import ParallelPort

p = ParallelPort(address=...)