Howdy, Stranger!

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

Supported by

Logging in Coroutines

Hi,
I have a question concerning the logging of keyboard responses within coroutines. I created an experiment, where I show two mental rotation images at the same time for 3 second. During these three seconds of stimulus presentation, I want subjects to indicate if both images are only rotated or also mirrored, using a keyboard response. In order to be able to do the stimulus presentation and the keyboar response at the same time (because the experiment lenght needs to be constant), i decided to use the coroutines, which is working fine so far. The only problem is that I don't really know how I can get the keyboard response and the reaction times of the key press out of it, since I can't put a logger or an inline script inside the coroutine. Can you help me with that?

Thanks a lot!
Best regards, Fabian

Comments

  • Hi Fabian,

    The typical solution would be to add the coroutines to a sequence, and add the logger to that sequence as well. Does that make sense? You see the idea in the screenshot below. (Trivia for the geeks: Screenshot taken with an Ubuntu Touch tablet.)

    Cheers,
    Sebastiaan

  • Thanks a lot for the quick response, Sebastiaan!
    I already had the logger there but in the coroutine the duration of the keyboard response was set to 0, which probably caused that no inputs were recorded. Now it's working fine!
    Cheers, Fabian

Sign In or Register to comment.