Hi every one, I’m new on PsychoPy and I have to create many tasks for my phd.
First, I’m trying to do a task where I will ask the participant to fixe a fixation even if there is distractions.
So, I did a first fixation and now I want to add stimuli on the side of the window every let say 5 seconds, the stimuli would come for 1 sec and disappear after.
#create a window
mywin = visual.Window([800,600], monitor="testMonitor", units="deg")
mywin.update()
#create a fixation and a stimuli
fixation = visual.GratingStim(win=mywin, size=0.7, pos=[0,0], sf=0, rgb=-1)
stimuli = visual.GratingStim(win=mywin, size=0.3, pos=[-11,0], sf=0, rgb=-1)
#draw the fixation and update the window
fixation.draw()
mywin.update()
#add timer
timer = core.Clock()
timer.add(10)
while timer.getTime()<5:
fixation.draw()
stimuli.draw()
mywin.update()
Am I using the right function timer ?
Thanks