Howdy, Stranger!

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

Supported by

possible to directly access a gamepad in a sketchpad?

Dear all,

I'm using a gamepad for response collection in my experiment. For this I use the joystick plugin. However, I also use sketchpads at a point where no accurate responses need to be collected. I just want to go on by pressing a button of the gamepad (and without having to switch to the keyboard).

Here's my question:

Is it possible to directly use a gamepad in a sketchpad without having to use a joystick plugin or defining a joystick variable at the beginning of the experiment? (for example, it is possible to directly use the keyboard by entering 'keypress' in 'duration')

Best and thanks in advance,

Robin Schäfer

Comments

  • Hi Robin,

    You cannot do this by entering something like 'joystick' in the duration field. However, you can set the duration to 0 and then follow the sketchpad by a joystick item. That's not so much trouble either, is it?

    Cheers!
    Sebastiaan

  • Hi Sebastiaan,

    Yes, that's fine. I was just interested if there is an alternative.

    Another question (please see the upload):
    I now use this joystick plug in the trial_sequence after a pause slide. I only need this pause slide 3times, so I used an 'if-statement' in the trial_sequence. This 'if-statement' is relatively complex. I only need the slides in the experimental items and only if the sentence_number-variable (which I increase by 1 every sentence) reaches a concrete number.
    It seems to me that this step slows down the program a lot. Between the button press of the gamepad_exp and the fixation cross of the next trial several seconds pass. I checked the response collection of gamepad_exp. This is fine. I assume that the data logging is also quite fast. So the only thing that lasts is the sequence itself.
    Is there a way to increase the speed here?

    Thanks again!

    Best,
    Robin

  • Hi Robin,

    The if-statement itself will not slow down the program. In most cases, long inter-trial delays are due to complex sketchpads and/ or inline_scripts. To reduce this, you could try one or both of the following:

    • Select a different backend. Depending on your hardware, different backends can differ dramatically in their performance in terms of stimulus-preparation time.
    • Simplify your inline_scripts.

    Cheers!
    Sebastiaan

Sign In or Register to comment.