psychopy.org | Reference | Downloads | Github

Feedback contingent on response

OS (e.g. Win10): MacBook v10.10.5
PsychoPy version (e.g. 1.84.x): v3.2.4
What are you trying to achieve?:

I created a stroop experiment on psychopy builder, but I need to add feedback that is contingent on the person’s response. Basically, participant responds within 5 seconds using the keyboard, and then after 0.5 seconds, text on the screen will say ‘correct’ or ‘try again’ depending on whether the participant got the answer right. After the feedback, the trial starts with new stimuli, and the timer clock resets.

How can I go about doing this?

Thank you.

Add a feedback routine after your other routine, and insert both a text component to give the feedback message, and a code component to decide what the feedback will be. Make sure the code component is above the text component. In the “begin routine” tab of the code component, put this:

if your_keyboard_component_name.corr:
    feedback = 'Correct'
else:
    feedback = 'Try again'

In the text component, put $feedback in the text field, and set it to update “every repeat”.

1 Like

Thank you so much!