OS (e.g. Win10):
PsychoPy version 2020.2.10
Standard Standalone? (y/n) yes
What are you trying to achieve?:
I’m trying to make an experiment where the participant sees an equation who’s answer will always be between 0 and 9. The participant then needs to press a number on the keypad and if the correct/incorrect response is given, the participant receives specific feedback.
I APOLOGISE IN ADVANCE FOR THE HORRIBLE FORMATTING, I CAN’T UPLOAD MORE THAN 2 PICTURES AS A NEW USER. I COULD BRUSH UP (hehe) ON MY PAINT SKILLS HOWEVER, WHICH IS NICE
What did you try to make it work?:
I built the following very basic experiment (see fig. 1):
with the following conditions file (see fig. 2):
which loads correctly (see fig. 3):
The first slide shows the equation, this works correctly (see fig. 4 and 5):
and a keyboard object is also present with the following settings (see fig. 6):
The second routine in the loop has the following components (see fig. 7):
So basicly a code object which will check if the pressed key is the same as the “answers” in the conditons file. and a text object which will show the message that is created in the code block. The code is the following (see fig. 8):
What specifically went wrong when you tried that?:
This experiment does not crash, but I need to press 2 keys before the feedback is triggered. I know this happens because when I look at the generated data file i see that two key presses are registered. An example where I press the same key twice (Fig. 9):
And an example where I first press the wrong key and afterwards the correct key (see Fig1 10):
results in the program thinking that the correct response has been pressed. What am I doing wrong and how can I make sure that the first pressed key is the one that will be evaluated?
THINGS I TRIED:
- place the code in the “each frame” part → CRASH
Many thanks in advance, wonderful product you guys made!