Initialising the experiment.. coding problems

I assume that this code is in a feedback routine that follows the routine with key_resp.

You don’t need elif, just have an else clause.

170ms is very fast. Try a longer cutoff.