I am trying to get my experiment in PsychoPy to work with BioSemi’s ActiView for EEG using coding in Python. I am using a serial port for the triggers. Using coding I was able to get the triggers to send to ActiView.
While I’ve been able to effectively send triggers to the system, every few trials I get a random number that replaces actual condition labels. There doesn’t appear to be any pattern to them (they don’t appear at specific time points or for specific trigger values/conditions).
These incorrect numbers are 242 and 192. They are replacing any one of the trigger codes I specified for each condition (1, 2, or 3).
Anyone have any experience with this or ideas on how to keep these errors from occurring in the first place? Are there certain values that would be better for the BIOSEMI system when coding triggers?
I’m hoping I don’t have to change them manually during preprocessing of the EEG data for every participant. I can share my experiment file if that helps. Below is my code in PsychoPy for triggers
port = serial.Serial(“COM4”, baudrate = 115200)
if trigger == 1:
elif trigger == 2:
elif trigger == 3: