**OS: Windows-10
**PsychoPy 2023.2.3
Hi! My Flanker Task code connected perfectly to the EEG software until I added another loop directly in front of it as a practice trial. The code was copied directly from the actual trials to the practice trials; only the names and rep #s were changed. However, adding the practice trials eliminated the EEG software triggers for both the practice and actual trials. Thoughts on getting them to show up with the addition of the practice trials?
Code:
import serial
congruentPort = serial.Serial("COM3")
congruent2Port = serial.Serial("COM3")
incongruentPort = serial.Serial("COM3")
incongruent2Port = serial.Serial("COM3")
CorrectPort = serial.Serial("COM3")
IncorrectPort = serial.Serial("COM3")
keyPressed = False
congruent = False
congruent2 = False
incongruent = False
incongruent2 = False
PortSent = False
respPortSent = False
kb = []
if display == "HHHHH" and t>=0.5:
congruent = True
if congruent == True:
congruentPort.write([0x01])
PortSent = True
timePressed = t
timeCont = timePressed+.1
if display == "SSSSS" and t>=0.5:
congruent2 = True
if congruent2 == True:
congruent2Port.write([0x02])
PortSent = True
timePressed = t
timeCont = timePressed+.1
if display == "HHSHH" and t>=0.5:
incongruent = True
if incongruent == True:
incongruentPort.write([0x03])
PortSent = True
timePressed = t
timeCont = timePressed+.1
if display == "SSHSS" and t>=0.5:
incongruent2 = True
if incongruent2 == True:
incongruent2Port.write([0x04])
PortSent = True
timePressed = t
Happy to provide the rest of the builder settings for both loops if needed. Already doubled checked and everything is definitely the same between them except for the aforementioned changes.
Thanks for any help!