I am setting up an online experiment in which I want to give feedback that evaluates if the response given by the participant was correct.
Importantly, when no response was given, I want a message to be displayed that states: “too slow”.
I have 2 problems:
the “too slow” feedback is never being initiated, my feedback always displays “correct” or “incorrect”.
my response from the previous trial seems to be carried over, even when I don’t press anything, it gives me the feedback from the previous trial again.
I have set up two routines. In the first routine my key response (set to every repeat) is recorded and I have ticked the boxes in the keyboard component that discards previous, which is why I don’t understand the carrying over of responses.
In a following feedback routine I have included this in a code components “Begin routine” tab:
ok, this part of the if-else construction evaluates apparently never as true. You could add some print-command to check the values of the relevant variables.
did not work. I checked what resp_test_inst_t1.keys is logging and it seems not empty, but it is logging: [] . I tried this and also tried to just negate the statement, and did
I admit that I did not test the above mentioned code online. The code I posted is auto-translated-code.
Perhaps, the following toy-experiment is more helpful. It accepts y and n as answer to y and n as stimuli. The stimulus and the correct key are set in an Excel-file. The feedback-routine presents correct, wrong and no answer as feedback-message.
many thanks for sending the example experiment with the working feedback routine. That definitely helped to identify the mistake I made.
It now works for me.
I figured out that, in a different code component, I still had these lines of code as a leftover code from something else: