I’m trying to set up my EEG experiment and have a problem with sending the triggers. My design is RSVP (rapid serial visual presentation) in which I’m presenting one word at the time. I would like to send the trigger when W4 appears.
Here’s what my trials look like:
I’m using the following code:
port = serial.Serial(‘COM3’)
pulse_started = False
pulse_ended = False
if W4 == True and not pulse_started:
pulse_start_time = globalClock.getTime()
pulse_started = True
if pulse_started and not pulse_ended:
if globalClock.getTime() - pulse_start_time ==0.01:
pulse_ended = True
Right now, no triggers are sent at all, so something is off. I’d be very grateful if someone could help me!