from psychopy import data
from psychopy import core, visual, gui, data, event
from psychopy.tools.filetools import fromFile, toFile
import numpy, random, csv, time
from psychopy import logging, prefs
prefs.general['audioLib'] = ['pyo'] # Set the Audio Library [pyo (highest performer, check it), sounddevice (looks promessing, check it) or pygame (not good with timing)]
prefs.general['audioDriver']=['coreaudio']
from psychopy import sound
win = visual.Window([400,300], monitor="testMonitor", units="cm", fullscr=False)
stimuli = []
datafile = open("audioStim.csv", "rb")
reader = csv.reader(datafile, delimiter=";")
for row in reader:
stimuli.append(row[0])
#print (stimuli)
datafile.close()
clock = core.Clock()
for stimulus in stimuli:
#print (stimuli)
for frameN in range(18):
#print clock.getTime()
sound_stimulus = sound.Sound(stimulus)
sound_stimulus.play()
win.callOnFlip(clock.reset)
win.flip()
## Closing Section
win.close()
core.quit()
这是什么错误,我该如何解决?
答案 0 :(得分:0)
请使用此主题完成所有建议的解决方案,尝试在x秒重置arduino,更新您的ftdi驱动程序等
Arduino Sketch upload issue - avrdude: stk500_recv(): programmer is not responding