Hi,

I purchased the DeirectIN rotary controller. I use E-Prime (it's what me department has), and while the PCs I use for my experiments recognize the device, E-Prime refuses to recognize the device. Their troubleshooting guide indicated that I require a .dll file to force E-prime to recognize the device (see: https://support.pstnet.com/entries/9...E-Prime-19547-).

Is such a file available? Thanks!



Quote Originally Posted by hbacovci View Post
Sure. I had to manually create the joystick object using pyglet, instead of using the PsychoPy joystick functions. See the code below for a minimal working example.

Code:
import pyglet
joysticks = pyglet.input.get_joysticks()


for joy in joysticks:
    if joy.device.name == 'Analog Scale Device':
        joy.open()
        break

def present_pair_joystick(trial,isi,curdata): #trial is a sound object, isis is the time to wait after response/end of sound, and curdata is a dictionary used to store response data
    event.clearEvents()
    while joy.buttons[0] or joy.buttons[1]:
        continue
    curdata['trial_start']=time.time()
    trial.play()
    dur = trial.getDuration()
    while True:
        if not (joy.buttons[0] and joy.buttons[1]):
            if joy.buttons[0]:
                curdata['rt'] = time.time() - curdata['trial_start']
                curdata['resp'] = 'Word'
                break
            elif joy.buttons[1]:
                curdata['rt'] = time.time() - curdata['trial_start']
                curdata['resp'] = 'Nonword'
                break
            if 'escape' in event.getKeys():
                core.quit()
    if time.time() - curdata['trial_start'] > dur:
        core.wait(isi)
    else:
        core.wait((dur - (time.time() - curdata['trial_start'])) + isi)
    curdata['dur'] = dur
    return
Hope that helps.