I am trying to collect the amount of space bar presses a subject can make in three seconds. Visually, I am displaying an empty bar on the screen at the onset of the trial, and every time the subject presses the space bar, I want to draw a new image with a bit of that bar being filled (to display progress). I am having trouble updating the image every space press. Here is what I have at the moment. On the second press, I would like to draw calibration_slide_2, on the third press I would like to draw calibration_slide_3, and so on.
calibration_time = 3 number_of_upates = 12 calibration_update_duration = .25 calibration_total_presses = 0 timer.reset() while timer.getTime() < 3: current_time = timer.getTime() key = kb.getKeys() if 'space' in key: calibration_total_presses = calibration_total_presses + 1 print (calibration_total_presses) calibration_slide_1.draw() win.flip()