Hi,
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:
#Begin experiment:
import serial
port = serial.Serial(‘COM3’)
port.write([0x00])
#begin routine:
pulse_started = False
pulse_ended = False
#each frame:
if W4 == True and not pulse_started:
port.write([0x01])
pulse_start_time = globalClock.getTime()
pulse_started = True
if pulse_started and not pulse_ended:
if globalClock.getTime() - pulse_start_time ==0.01:
port.write([0x00])
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!