def mytask(): triggerSeries = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 3, 5, 7, 9, 11, 2, 4, 6, 8, 10 ] for triggernum in triggerSeries: counter = 0 currentpos = position[str(triggernum)] trigger = vizshape.addSphere( radius=0.15, slices=20, stacks=20, axis=vizshape.AXIS_Y, pos=[currentpos[0], currentpos[1] - 0.9, currentpos[2]]) trigger.color(viz.RED) while True: counter += 1 cue = onlinecueInitial(0.01) #serial.serialWrite(counter) yield viztask.addAction(squares['square' + str(1)], cue) triggerWrite(i) yield stistage() if counter >= 10: break trigger.remove()
def mytask(): shortcue = onlinecueInitial(0.01) cue = cueInitial(cuelen) for cueLoop in range(len(cueseries)): series = cueseries[cueLoop] for i in series: yield viztask.addAction(squares['square' + str(i)], cue) #myserial.serialWrite((i+1)) triggerWrite(i) yield stistage()
def mytask(): counter = 0 while True: counter += 1 cue = onlinecueInitial(0.01) #serial.serialWrite(counter) yield viztask.addAction(squares['square' + str(1)], cue) yield stistage() if counter > 250: counter = 0