Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 11 of 11

Thread: DirectIN Rotary Controller on Mac OS 10.10 (case 19155)

  1. #1

    DirectIN Rotary Controller on Mac OS 10.10 (case 19155)

    Hi all,

    I'm trying to use the DirectIN Rotary Controller on Mac OS 10.10 Yosemite. It is not registering as a keyboard. It is being detected as an "Analog Scale Device", as part of the USB system information. I've reproduced all of the system information below:

    Product ID: 0x0060
    Vendor ID: 0x04db
    Version: 0.01
    Speed: Up to 12 Mb/sec
    Manufacturer: Empirisoft Corporation
    Location ID: 0x14500000 / 9
    Current Available: 500
    Current Required: 100

    Right now it isn't in any way responsive. I'm wondering if it is a firmware issue, but I couldn't find a link to firmware upgrades.
    Last edited by jason_reed; 05-20-2015 at 02:59 PM.

  2. #2
    Join Date
    Nov 2005
    Posts
    294
    Hi,

    The Rotary Controller is designed to appear to your computer as a standard joystick, one with two pushbuttons and analog activity on the X-axis. So it's not surprising that you aren't seeing any keyboard output.

    How were you planning to use the controller?

    John

  3. #3
    Quote Originally Posted by JEC View Post
    Hi,

    The Rotary Controller is designed to appear to your computer as a standard joystick, one with two pushbuttons and analog activity on the X-axis. So it's not surprising that you aren't seeing any keyboard output.

    How were you planning to use the controller?

    John
    Ah. We were hoping to integrate it with psychopy. Knowing that it acts as a joystick instead of a keyboard should make it easier to get the correct python packages to access it. Thank you very much.

  4. #4
    Also, your website (about the Rotary Controller) currently says:
    • Boxes should work properly with virtually all software as they will appear to the computer as regular keyboards.


    This should probably be changed to say appear to computer as regular joystick to avoid this confusion in the future.

  5. #5
    Join Date
    Nov 2005
    Posts
    294
    Quote Originally Posted by hbacovci View Post
    Ah. We were hoping to integrate it with psychopy. Knowing that it acts as a joystick instead of a keyboard should make it easier to get the correct python packages to access it. Thank you very much.
    Just curious - have you had any luck using the controller with your software?

  6. #6
    Quote Originally Posted by JEC View Post
    Just curious - have you had any luck using the controller with your software?
    Yes. There were some issues, but they had to do with the software's joystick integration in general as opposed to an empirisoft specific problem.

  7. #7
    Join Date
    May 2015
    Posts
    2
    Quote Originally Posted by hbacovci View Post
    Yes. There were some issues, but they had to do with the software's joystick integration in general as opposed to an empirisoft specific problem.
    Would you mind giving some more information regarding how you got this set up to work? I just purchased the DirectIN Rotary Controller with the intention of using it in PsychoPy2 as well, and so far I cannot get the program to recognize it. Thanks in advance.

  8. #8
    Quote Originally Posted by jvcasill View Post
    Would you mind giving some more information regarding how you got this set up to work? I just purchased the DirectIN Rotary Controller with the intention of using it in PsychoPy2 as well, and so far I cannot get the program to recognize it. Thanks in advance.
    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.

  9. #9
    Join Date
    May 2015
    Posts
    2
    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.

    Thank you for your reply. I am trying got conduct a two-alternative forced choice experiment. I was under the impression that this button box worked like a keyboard, not a joystick. Unfortunately I don't have a lot of experience outside of the builder view. Do you think it would be possible to use your code in a custom code snippet inside one of my trials? In other words I could replace the keyboard response component with a custom component. I tried this without any luck so far. Thanks again for any help.

  10. #10
    Quote Originally Posted by jvcasill View Post
    Thank you for your reply. I am trying got conduct a two-alternative forced choice experiment. I was under the impression that this button box worked like a keyboard, not a joystick. Unfortunately I don't have a lot of experience outside of the builder view. Do you think it would be possible to use your code in a custom code snippet inside one of my trials? In other words I could replace the keyboard response component with a custom component. I tried this without any luck so far. Thanks again for any help.
    Sorry, I'm not experienced with the builder view, so I'm not sure exactly how to go about implementing it. It should be possible to set up something with coding custom code snippet. I'd get in touch with the PsychoPy community and ask about how to implement joystick input in the builder view. Best of luck!

  11. #11
    Join Date
    Sep 2016
    Posts
    1
    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.

Similar Threads

  1. DirectIn Response boxes on Mac OS 10.5/10.6
    By susa in forum Hardware: Troubleshooting
    Replies: 15
    Last Post: 04-08-2013, 05:45 PM
  2. Soooo Mac or no Mac? (case 6526)
    By baruche in forum DirectRT Older Versions: General Questions
    Replies: 4
    Last Post: 03-26-2013, 01:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •