Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Using the SR Box from inline code

edited October 2012 in OpenSesame

Hi,
I have an experiment in which I want to collect a response using a response box. I've inserted the srbox plugin at the beginning of my experiment and use the collect_button_press function in my inline_script. However, responses are not detected. What am I doing wrong?

Paul

Comments

  • edited 9:34PM

    Hi Paul,

    Welcome to the forum!

    I'm assuming that the experiment hangs when you try to collect a button press. Is that correct? Or do you receive an error message of some kind? (If so, please post!)

    My guess is that you are connecting to the wrong port. OpenSesame can detect that a device is present on some port, but not whether it actually is an SR Box. If it tries to use another device as though it were an SR Box, weird things are obviously bound to happen.

    So I would try a few different ports under Device name. On Windows, ports are named COM1, COM2, COM3, and so forth (also see the Windows device manager). If you get an error, the port does not exist. If you do not get an error, but the experiment hangs, you have connected to an existing port with the wrong device.

    Good luck!
    Sebastiaan

  • edited 9:34PM

    Hi Sebastiaan,

    Thanks for your response!

    I'm already connecting to the COM4 port, and it's no problem collecting a response when using the plugin. However, when I want to collect a response in my inline_script the experiment hangs (unless I set a timeout). I get no error message.

    Paul

  • edited 9:34PM

    Ah, I see. Did you insert your code in the Run phase of the inline_script item (you should)? If that's not the problem, perhaps you could post (the relevant part of) your script here so we can figure out what's wrong. It's probably something trivial: If the plug-in works, you should be able to use the SR Box through inline code as well.

    Cheers!

  • edited 9:34PM

    Hi Sebastiaan,
    It's solved. The problem was I didn't turn on the sending mode before collecting a response.

    Cheers!

Sign In or Register to comment.